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/
bathroom cleaning service Northbrook ..That's right. Your method, behavior and strategy you are now... Read More
What to do if you are an artist after you... Read More
I recently received an unsolicited e-mail from some company offering... Read More
A PHP Redirect automatically transfers a web user from one... Read More
The growth in Internet usage around the world is astounding... Read More
1. The first page appears quickly.It's a good way to... Read More
More and more non-profit organizations are developing websites to help... Read More
It may come as some surprise to a traditionally off-line... Read More
When visitors add your web site to their Favorites or... Read More
Many executives and investors are skeptical that software products can... Read More
RIVERSIDE, CA August 4, 2004 ?- "Historically, small business owners... Read More
Your ObjectiveYour small business needs an appealing and professional website... Read More
Below, I have listed 8 simple steps that you can... Read More
Having an eye catching website is great, but are you... Read More
Before you set up any scripts you will need some... Read More
You have seen those web pages where they have the... Read More
The internet is a sea of knowledge. Getting your information... Read More
The first step in setting up an online business...Starting an... Read More
As a business you can't afford to ignore the Internet... Read More
If you're fairly new to the Internet scene, you may... Read More
In a previous ezinearticles.com article,"I Need real visitors, Not Search... Read More
Right after the thought, "I need a website," people usually... Read More
To the starting internet entrepreneur, there is nothing more discouraging... Read More
After having decided to start a business, the next thing... Read More
Mini Websites are the most powerful and cost effective solution... Read More
insured cleaning company Wilmette ..How popular is online shopping? And is there room for... Read More
Dance is how you pamper your soul and satiate your... Read More
Is your website Really useful?I had a 'rep' in yesterday... Read More
How can we add Word Rich Content to our Websites... Read More
When marketing your website, it's important to know which of... Read More
Having an eye catching website is great, but are you... Read More
There are lots of HTML editors on the market, however,... Read More
QUESTION: Should I build and maintain my business Web... Read More
Appealing to others is really important when you have a... Read More
Running an effective website is a continuous process. I have... Read More
Mini Websites are the most powerful and cost effective solution... Read More
With more and more countries around the world passing laws... Read More
"What's in it for me?" you ask. "Why should I... Read More
Here's something you may never have thought of before:If I... Read More
Succeeding with an eCommerce website is a dream for many... Read More
--------------------------------Why Should You Create a website?--------------------------------A. What do you want... Read More
After years of working with entrepreneurs who developed their first... Read More
Web sites are not just places to sell things; they... Read More
When you consider the billions of individuals and companies on... Read More
When I started my company in 2002, I knew I... Read More
Writing for the web is totally different to writing for... Read More
What is the most important part of your online business?Many... Read More
When building a relationship, listening is more important than talking.A... Read More
Thinking about starting up a business? The web is the... Read More
Did you know that hosting companies overcrowd their servers despite... Read More
Web Development |