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/
high-end home cleaning Morton Grove ..Recently I was reviewing the keyword specific conversion rate data... Read More
Functions and Subroutines in ASP If you read... Read More
With search engines putting a damper on direct reciprocal links,... Read More
Your website conversion rate should concern you. This simply refers... Read More
Q1.Why would I need a web site? A1.- Improve my... Read More
Webmasters deal with a myriad of complex design challenges every... Read More
Looks like every client wants a Flash site these days... Read More
A website is the most versatile and cost-effective marketing tool... Read More
Everywhere you look these days, people are telling you that... Read More
When building a relationship, listening is more important than talking.A... Read More
Visitors to your site come looking for information or solutions... Read More
1) Word of Mouth The single most powerful form of... Read More
When we review the sites of potential clients, there are... Read More
Launching a new small business website is often a long... Read More
Your site is getting traffic, but conversion rates are horrible.... Read More
Below, I have listed 8 simple steps that you can... Read More
There's been widespread speculation about the new legislation being introduced... Read More
I still remember it very clear ... It was almost... Read More
Directory Generator, a product from Armand Morin and Marc Quarles,... Read More
If you are looking for creating your online presence you... Read More
1. Address your targeted audience on your business site. Example:... Read More
Many small businesses have the misconception that their business can... Read More
When most people build a web site, they think one... Read More
Recently, a friend asked "What's the deal with those DIY... Read More
What is the most important part of your online business?Many... Read More
spring cleaning service Buffalo Grove ..After having decided to start a business, the next thing... Read More
Huge Mistake #1: Creating a Website with Flash -- Did... Read More
Making maximum profit from your law firm website is important,... Read More
Like most average persons, I wanted some extra money to... Read More
If you're looking for better web site ROI, chances are,... Read More
The "robots" meta tag, when used properly, will tell the... Read More
Your ObjectiveYour small business needs an appealing and professional website... Read More
Looks like every client wants a Flash site these days... Read More
Directory Generator, a product from Armand Morin and Marc Quarles,... Read More
Just starting out, you can start with a simple informational... Read More
So you want to have a website. You have gone... Read More
"Don't Sell the Steak, Sell the Sizzle."Have you heard of... Read More
D.zigns dzignerwebs The Basics Before starting on... Read More
If you haven't made the sales and built your clients... Read More
So you have a good idea for a business and... Read More
1. The first page appears quickly.It's a good way to... Read More
Every small business owner knows that they need a website,... Read More
The Disability Discrimination Act states that service providers must not... Read More
A website lets you put your products in front of... Read More
Are you aware that 90% of the websites on the... Read More
Many millions of dollars are being wasted on promoting and... Read More
What do you mean, you don't have a website for... Read More
I'm a freelance programmer and somehow I managed to get... Read More
What is SQL? SQL stands for Structured Query Language and... Read More
While most marketers are beginning to understand the critical importance... Read More
Web Development |