In this example I have used the map of the Itasca demo of the Mapserver. I have done only small changes to the map file. The Itasca demo has (into the html file) the parameters of the path where to store the images:
IMAGEPATH "set in index.html" IMAGEURL "set in index.html"
I have changed them as fixed path
IMAGEPATH "/tmp/ms_tmp/" IMAGEURL "/ms_tmp/"
Than I have set as STATUS ON several layers for a better map.
The Database
The positions and the images paths that have to be shown on the map are stored into a table of a database in MySql. I have created a new database named "mapexample" and a new table "weather":
CREATE TABLE weather (
id bigint(20) NOT NULL auto_increment,
imagepath varchar(255) default NULL,
x double(16,4) default NULL,
y double(16,4) default NULL,
PRIMARY KEY (id)
)
and than I have inserted into the table the positions of the weather images and the path of every icon:
INSERT INTO `weather` VALUES (1, '/data/weather/icons/sunny.gif', 478107.0000, 5250301.0000); INSERT INTO `weather` VALUES (2, ''/data/weather/icons/cloudy.gif', 408107.0000, 5220301.0000); INSERT INTO `weather` VALUES (3, ''/data/weather/icons/storm.gif', 468107.0000, 5270301.0000); INSERT INTO `weather` VALUES (4, ''/data/weather/icons/variable.gif', 408107.0000, 5310301.0000);
It is not necessary for the images to be stored into a directory visible from the web, because are taken directly by the script and then merged with the map.
The PHPMapscript code Here is the code I have used for generating the map: ">
More info: http://www.parsec.it/tutorials/
Roberto Colonello owns and operates http://www.parsec.it/tutorials/ and http://www.parsec.it/tutorials/
scheduled cleaning services Winnetka ..Customer service questionnaires can help your clients better understand their... Read More
2 Golden Rules for an Engaging Website35% of visitors fail... Read More
Fresh website content for your visitors can be of real... Read More
Recently I was reviewing the keyword specific conversion rate data... Read More
Your business website is a critical aspect of being able... Read More
Webmaster tools are vital to becoming both efficient and effective... Read More
The Internet is being used by local service business to... Read More
80% of your Web site is Maintenance!Once your Web site... Read More
The DDA (Disability Discrimination Act) states that service providers must... Read More
Your web site will be your window to the world.... Read More
After planning the design and content of your website, it's... Read More
A simple website stats counter is not enough if you... Read More
Most people know they need a website in order to... Read More
The first thing you will have to deal building your... Read More
One of my most salient memories from when I sold... Read More
When we review the sites of potential clients, there are... Read More
Mini Websites are the most powerful and cost effective solution... Read More
A website is lifeline of internet home business. In order... Read More
1. Splash pagesMost of the time splash pages are uncalled... Read More
How popular is online shopping? And is there room for... Read More
Launching a new small business website is often a long... Read More
The definition of the phrase "Content Management" depends on what... Read More
So you want to have a website. You have gone... Read More
In a previous ezinearticles.com article,"I Need real visitors, Not Search... Read More
"I have a small business with just a couple of... Read More
reliable maid service Lincolnshire ..Globalize Your WebsiteThe Internet has unlocked a wide array of... Read More
If you have some experience in web site design and... Read More
1) Word of Mouth The single most powerful form of... Read More
If you ever want to create a state directory, article... Read More
1. Be clear on your purpose.Building a website can be... Read More
Below, I have listed 8 simple steps that you can... Read More
Creating a content management system either from scratch,... Read More
D.zigns dzignerwebs The Basics Before starting on... Read More
You hear a great deal about the Internet these days... Read More
When most people build a web site, they think one... Read More
After deciding what kind of internet business you want to... Read More
Just starting out, you can start with a simple informational... Read More
When I started my company in 2002, I knew I... Read More
People like to get immediate responses to requests. Autoresponders are... Read More
First, using a lot of web graphics, flash, banners and... Read More
If you like the Internet and surfing through the billions... Read More
Most people know they need a website in order to... Read More
Although designing a great web site is an important part... Read More
It is an undeniable fact that not everybody is keen... Read More
In the region where my company is located, South Bend,... Read More
How do you decide on the content, products and or... Read More
Never has competition been so difficult in the Internet world.... Read More
Webmaster tools are vital to becoming both efficient and effective... Read More
That's right. Your method, behavior and strategy you are now... Read More
What is the point of having a website, you may... Read More
Web Development |