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/
high-end home cleaning Des Plaines ..Some left shoes are in isle 5, while the right... Read More
Think up a name and check if yourname.com is available.... Read More
The evolution of web development parallels the model of technology... Read More
After planning the design and content of your website, it's... Read More
Every small business owner knows that they need a website,... Read More
We all start out the same. Some have budgets, some... Read More
So your prospect, Mary, is sitting at the computer reading... Read More
"I have a small business with just a couple of... Read More
Web sites are not just places to sell things; they... Read More
This is a growing concern amongst many business owners. Does... Read More
The internet has taken over our lives with a vengeance,... Read More
Through the explosive growth of the Web, companies have realized... Read More
Many millions of dollars are being wasted on promoting and... Read More
The art of turning website visitors into paying customers depends... Read More
A website is the most versatile and cost-effective marketing tool... Read More
SummaryHere's the scoop on what you must know when designing... Read More
The Disability Discrimination Act states that service providers must not... Read More
It never ceases to amaze me how many people set-up... Read More
Server Side Includes (SSI) with ASP People often... Read More
Revenues are often lost because many business owners don't see... Read More
That's right. Your method, behavior and strategy you are now... Read More
Do you make your website just to entertain yourself or... Read More
Q. Hey, Cathy: I'm just setting up a website. What... Read More
If you are developing your website on a host that... Read More
Go to any internet marketing forum you want these days... Read More
house refresh service Glencoe ..In the big, wide online world there are millions of... Read More
1. SiteSpinner V2 - On Sale www.deprice.com/sitespinner.htmSiteSpinner is a user-friendly... Read More
Having an eye catching website is great, but are you... Read More
Your ObjectiveYour small business needs an appealing and professional website... Read More
There are hundreds of millions of Web surfers today. Each... Read More
Wow, we`ve already taken a domain and chosen a web... Read More
One of my most salient memories from when I sold... Read More
Creating a content management system either from scratch,... Read More
So you want to have a website. You have gone... Read More
When most people build a web site, they think one... Read More
There are millions and millions of websites on the Internet.... Read More
They might not be wearing a mask and carrying a... Read More
Webmasters deal with a myriad of complex design challenges every... Read More
Webmaster tools are vital to becoming both efficient and effective... Read More
When I set up my website I felt paypal was... Read More
I recently received an unsolicited e-mail from some company offering... Read More
Like wine cars get more attractive to collectors as years... Read More
Many of site owners still don't realize all advantages of... Read More
Can you imagine the hypocrisy of spending thousands of dollars,... Read More
If you have some experience in web site design and... Read More
It may seem like the publishing industry's equivalent of Beanie... Read More
You hear a great deal about the Internet these days... Read More
The growth in Internet usage around the world is astounding... Read More
We've all seen those messages on some websites warning not... Read More
What you should do and know if you are an... Read More
Web Development |