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/
spotless home service Lake Forest ..Creating a content management system either from scratch,... Read More
Starting an internet business can be confusing to non-veterans. The... Read More
SummaryHere's the scoop on what you must know when designing... Read More
What do you mean, you don't have a website for... Read More
What is web accessibility & why is it important?Web accessibility... Read More
The needs of screen magnifier users are overlooked when implementing... Read More
When marketing your website, it's important to know which of... Read More
RIVERSIDE, CA August 4, 2004 ?- "Historically, small business owners... Read More
Everywhere you look these days, people are telling you that... Read More
If you're looking for better web site ROI, chances are,... Read More
One of my most salient memories from when I sold... Read More
Appealing to others is really important when you have a... Read More
Your site is fast and getting traffic, but conversion rates... Read More
A website is lifeline of internet home business. In order... Read More
1) A marketing necessityI still hear it said from time... Read More
Are bloated images slowing down your web site and causing... Read More
This is a growing concern amongst many business owners. Does... Read More
URL rewriting are major needs for your sites that produce... Read More
One of the most useful features offered by some web... Read More
An Introduction to Server Side IncludesBeginner? That's OK!While much has... Read More
It may seem like the publishing industry's equivalent of Beanie... Read More
The Disability Discrimination Act says that websites must be made... Read More
Most people know they need a website in order to... Read More
1) Data CaptureOne easy way to collect e-mail addresses and... Read More
Whether you have your own business already, or are looking... Read More
weekly home cleaning Mundelein ..When marketing your website, it's important to know which of... Read More
The first thing you will have to deal building your... Read More
An Introduction to Server Side IncludesBeginner? That's OK!While much has... Read More
Wow, we`ve already taken a domain and chosen a web... Read More
Keywords in Search Engine Optimizing and Search Engine Marketing are... Read More
What happened on your website yesterday? What about last week... Read More
You work hard to build traffic to your web page.... Read More
If you don't have a web site yet, are thinking... Read More
Rosalind wants to share her inspirational poetry with a wider... Read More
Although designing a great web site is an important part... Read More
The "robots" meta tag, when used properly, will tell the... Read More
Running an effective website is a continuous process. I have... Read More
If you were asked to put a value on your... Read More
1. Address your targeted audience on your business site. Example:... Read More
The Disability Discrimination Act says that websites must be made... Read More
An accessible Web site is easily approached, easily understood, and... Read More
Selecting the Perfect Domain NameThe first issue I have with... Read More
There is an ongoing debate about web copy. Some say... Read More
What do you mean, you don't have a website for... Read More
Better Web Site ROIHow to increase your business profitability by... Read More
This simple question can take on several different forms, but... Read More
You hear a great deal about the Internet these days... Read More
People often come to me in a state of crisis... Read More
Everyday thousands of new businesses make the leap and take... Read More
You have permission to publish this article electronically, in print,... Read More
Web Development |