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/
family-safe home cleaners Northbrook ..A system development process can follow a number of standard... Read More
Most interactive websites nowadays require data to be presented dynamically... Read More
Q. Hey, Cathy: I'm just setting up a website. What... Read More
In a previous ezinearticles.com article,"I Need real visitors, Not Search... Read More
Most interactive websites nowadays would require a user to log... Read More
You have permission to publish this article electronically, in print,... Read More
Building a new website can be a lengthy task. From... Read More
What is CSS?CSS is a simple file which controls the... Read More
RIVERSIDE, CA August 4, 2004 ?- "Historically, small business owners... Read More
"What's in it for me?" you ask. "Why should I... Read More
I talk with so many people who have small businesses... Read More
Think up a name and check if yourname.com is available.... Read More
A common dilemma most small and medium businesses face when... Read More
Below, I have listed 8 simple steps that you can... Read More
Some left shoes are in isle 5, while the right... Read More
Just like all things in life, the ways to run... Read More
Every good Internet business understands the value of conversions versus... Read More
Yahoo has long offered email, an online calendar, notes, bookmarks,... Read More
Optimal website design is the art of logical navigation.It will... Read More
Are you aware that 90% of the websites on the... Read More
One of the best tools you have as a webmaster... Read More
So you have a good idea for a business and... Read More
So what do you do if need to get a... Read More
Before you start building your site, ask yourself "WHY?". Why... Read More
Succeeding with an eCommerce website is a dream for many... Read More
residential cleaning services Deerfield ..The Internet has opened a whole New World of opportunity... Read More
Webmaster tools are vital to becoming both efficient and effective... Read More
The evolution of web development parallels the model of technology... Read More
If you haven't made the sales and built your clients... Read More
1) Data CaptureOne easy way to collect e-mail addresses and... Read More
"I am a writer, not a business-person. I don't want... Read More
When building a relationship, listening is more important than talking.A... Read More
You work hard to build traffic to your web page.... Read More
After deciding what kind of internet business you want to... Read More
Fresh website content for your visitors can be of real... Read More
How can we add Word Rich Content to our Websites... Read More
Directory Generator, a product from Armand Morin and Marc Quarles,... Read More
Functions and Subroutines in ASP If you read... Read More
I'm a freelance programmer and somehow I managed to get... Read More
Failure, just like success, is measured differently by each and... Read More
The Internet is being used by local service business to... Read More
RIVERSIDE, CA August 4, 2004 ?- "Historically, small business owners... Read More
The first step in setting up an online business...Starting an... Read More
Q1.Why would I need a web site? A1.- Improve my... Read More
When web content gets discussed on webmaster bulletin boards, the... Read More
How do you decide on the content, products and or... Read More
There are hundreds of millions of Web surfers today. Each... Read More
You've put up a website to promote a product or... Read More
When a user signs up at your website, you may... Read More
We all start out the same. Some have budgets, some... Read More
Web Development |