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/
weekly home cleaning Highland Park ..As increasing numbers of people search for information on the... Read More
Designing and creating your own website does not have to... Read More
The Internet has opened a whole New World of opportunity... Read More
From early days of www, the Internet sites that are... Read More
Getting a Targeted Visitor to a website is a waste... Read More
The needs of screen magnifier users are overlooked when implementing... Read More
You've put up a website to promote a product or... Read More
There are hundreds of millions of Web surfers today. Each... Read More
Building a new website can be a lengthy task. From... Read More
A website lets you put your products in front of... Read More
This simple question can take on several different forms, but... Read More
A while ago one of my clients approached me and... Read More
Why do some sites succeed while the vast majority of... Read More
The DDA (Disability Discrimination Act) states that service providers must... Read More
An interesting eCommerce success factor that isn't precisely overlooked, but... Read More
Like any area of business your website needs some effort... Read More
What is web accessibility & why is it important?Web accessibility... Read More
"I am a writer, not a business-person. I don't want... Read More
Making a web site is easy. Making a good web... Read More
I'm one of those people that always wanted a website,... Read More
Whether you have your own business already, or are looking... Read More
With more and more countries around the world passing laws... Read More
The popular search engine Google indexes over 8 billion websites.... Read More
#5 User Satisfaction: Learn what your visitors and site users... Read More
We are clearly well past the innocent "golden age" of... Read More
whole house cleaning Park Ridge ..With all of the factors involved in designing and building... Read More
Never has competition been so difficult in the Internet world.... Read More
We all start out the same. Some have budgets, some... Read More
Mini Websites are the most powerful and cost effective solution... Read More
Rosalind wants to share her inspirational poetry with a wider... Read More
The growth in Internet usage around the world is astounding... Read More
Why do some web sites reap huge benefits while others... Read More
If one more business owner tells me their website sucks... Read More
1) Data CaptureOne easy way to collect e-mail addresses and... Read More
See how you can create graphic effects on text with... Read More
Your business website is a critical aspect of being able... Read More
Most people know they need a website in order to... Read More
When used to describe a web site, the term "sticky"... Read More
Do you need a web site? Are you considering getting... Read More
While studying online for IT investment opportunities, I found that... Read More
1. The first page appears quickly.It's a good way to... Read More
Your site is getting traffic, but conversion rates are horrible.... Read More
Recently, a friend asked "What's the deal with those DIY... Read More
The first thing you will have to deal building your... Read More
Just starting out, you can start with a simple informational... Read More
Is Your Web Site an Expense or an Investment?Why don't... Read More
If you are developing your website on a host that... Read More
First, using a lot of web graphics, flash, banners and... Read More
Website, website, website, everyone says you need one. But do... Read More
1. Many people are not getting good or complete advice.... Read More
Web Development |