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/
recurring housekeeping Wilmette ...Most people know they need a website in order to... Read More
When I set up my website I felt paypal was... Read More
There are lots of HTML editors on the market, however,... Read More
The internet is a sea of knowledge. Getting your information... Read More
What do you mean, you don't have a website for... Read More
Keywords in Search Engine Optimizing and Search Engine Marketing are... Read More
Looks like every client wants a Flash site these days... Read More
With all of the factors involved in designing and building... Read More
In the late 1990's three San Francisco based web developers... Read More
In a previous ezinearticles.com article,"I Need real visitors, Not Search... Read More
The cost of setting up a web site is dirt... Read More
In this day and age most businesses consider having their... Read More
Do you need a web site? Are you considering getting... Read More
When marketing your website, it's important to know which of... Read More
Part of the success of most home-based businesses is their... Read More
1. SiteSpinner V2 - On Sale www.deprice.com/sitespinner.htmSiteSpinner is a user-friendly... Read More
I'm one of those people that always wanted a website,... Read More
Most interactive websites nowadays would require a user to log... Read More
Psychology is a long word which everyone thinks, "no, that's... Read More
There are many different traffic analysis tools, ranging from simple... Read More
Can you imagine the hypocrisy of spending thousands of dollars,... Read More
So your prospect, Mary, is sitting at the computer reading... Read More
That's right. According to a recent study by Nielsen/NetRatings, Amazon.com... Read More
"How do I improve web site sales figures?" The CEO... Read More
How popular is online shopping? And is there room for... Read More
best value cleaning service Arlington Heights ..."Don't Sell the Steak, Sell the Sizzle."Have you heard of... Read More
There's been widespread speculation about the new legislation being introduced... Read More
How popular is online shopping? And is there room for... Read More
Through the explosive growth of the Web, companies have realized... Read More
Thousands of people are now making a living online and... Read More
When you publish a content site there are times when... Read More
The process of Web application development is critical to the... Read More
Everywhere you look these days, people are telling you that... Read More
Is your website Really useful?I had a 'rep' in yesterday... Read More
Your site is getting traffic, but conversion rates are horrible.... Read More
An automated accessibility tool is a piece of software which... Read More
A system development process can follow a number of standard... Read More
How do you decide on the content, products and or... Read More
So you finally decided to invest in a web presence... Read More
In about the Time it takes to Watch a Reality... Read More
Every small business owner knows that they need a website,... Read More
Keywords in Search Engine Optimizing and Search Engine Marketing are... Read More
So you have a good idea for a business and... Read More
When people think about the Internet, they think about technology.... Read More
A common dilemma most small and medium businesses face when... Read More
The first thing you will have to deal building your... Read More
1) Data CaptureOne easy way to collect e-mail addresses and... Read More
Most interactive websites nowadays require data to be presented dynamically... Read More
A professional online reputation is essential to the flourishing of... Read More
Failure, just like success, is measured differently by each and... Read More
Web Development |