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/
one time home cleaning Highland Park ..Most interactive websites nowadays would require a user to log... Read More
Starting an internet business can be confusing to non-veterans. The... Read More
Is Your Web Site an Expense or an Investment?Why don't... Read More
What happened on your website yesterday? What about last week... Read More
Web sites are an Ongoing Part of Business.All too many... Read More
How do you decide on the content, products and or... Read More
When I set up my website I felt paypal was... Read More
Build it and they will come is not always true;... Read More
If you're anything like most small business owners, you probably... Read More
1) Word of Mouth The single most powerful form of... Read More
Looks like every client wants a Flash site these days... Read More
I'm one of those people that always wanted a website,... Read More
More and more non-profit organizations are developing websites to help... Read More
Although there are significant differences among the various types of... Read More
Design and layout can make your communication come alive and... Read More
Thousands of people are now making a living online and... Read More
Most people know they need a website in order to... Read More
A professional online reputation is essential to the flourishing of... Read More
Everyone wants one.Everyone wishes they knew how to make one.SOME... Read More
After years of working with entrepreneurs who developed their first... Read More
Whether you have your own business already, or are looking... Read More
Did you know that hosting companies overcrowd their servers despite... Read More
Huge Mistake #1: Creating a Website with Flash -- Did... Read More
Some left shoes are in isle 5, while the right... Read More
People like to get immediate responses to requests. Autoresponders are... Read More
licensed cleaning services Park Ridge ..QUESTION: Should I build and maintain my business Web... Read More
One of the most important parts of establishing a new... Read More
No matter what browser you may want to use, you... Read More
Rosalind wants to share her inspirational poetry with a wider... Read More
An Introduction to Server Side IncludesBeginner? That's OK!While much has... Read More
Did you know that hosting companies overcrowd their servers despite... Read More
You've put up a website to promote a product or... Read More
Revenues are often lost because many business owners don't see... Read More
Q. Hey, Cathy: I'm just setting up a website. What... Read More
If you are looking for creating your online presence you... Read More
So your prospect, Mary, is sitting at the computer reading... Read More
I recently received an unsolicited e-mail from some company offering... Read More
No matter the size of your business, having a web... Read More
Go to any internet marketing forum you want these days... Read More
Website, website, website, everyone says you need one. But do... Read More
Just like all things in life, the ways to run... Read More
Build it and they will come is not always true;... Read More
The following is a list of patterns that many visitors... Read More
It amazes me how many people try to build serious... Read More
The Disability Discrimination Act says that websites must be made... Read More
In my previous life.....Actually, my previous JOB life, I was... Read More
There are many different traffic analysis tools, ranging from simple... Read More
I talk with so many people who have small businesses... Read More
If you're anything like most small business owners, you probably... Read More
Most web sites are more like stage sets than real... Read More
Web Development |