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 and http://www.gmdir.com
1. SiteSpinner V2 - On Sale www.deprice.com/sitespinner.htmSiteSpinner is a user-friendly... Read More
There are lots of HTML editors on the market, however,... Read More
Have you ever wondered what challenges are faced by other... Read More
Thinking about starting up a business? The web is the... Read More
Cost Effective Advertising. Online selling. Increased geopgraphic range. Wider... Read More
Rosalind wants to share her inspirational poetry with a wider... Read More
Below, I have listed 8 simple steps that you can... Read More
Many small businesses have the misconception that their business can... Read More
In my previous life.....Actually, my previous JOB life, I was... Read More
For years now I've been looking to start my own... Read More
There's been widespread speculation about the new legislation being introduced... Read More
It never ceases to amaze me how many people set-up... Read More
While most marketers are beginning to understand the critical importance... Read More
You work hard to build traffic to your web page.... Read More
What is SQL? SQL stands for Structured Query Language and... Read More
Mini Websites are the most powerful and cost effective solution... Read More
Now that you have got your domain name registered, your... Read More
The DDA (Disability Discrimination Act) states that service providers must... Read More
If you were asked to put a value on your... Read More
Every online entrepreneur I talk to is asking the same... Read More
Most interactive websites nowadays would require a user to log... Read More
Losing website sales and traffic is sometimes simply a case... Read More
How do you decide on the content, products and or... Read More
Like most average persons, I wanted some extra money to... Read More
Anyone who knows anything about web accessibility knows that images... Read More
Like any area of business your website needs some effort... Read More
Through the explosive growth of the Web, companies have realized... Read More
In the late 1990's three San Francisco based web developers... Read More
Webmasters deal with a myriad of complex design challenges every... Read More
The definition of the phrase "Content Management" depends on what... Read More
Web sites are an Ongoing Part of Business.All too many... Read More
What is the point of having a website, you may... Read More
Your business website is a critical aspect of being able... Read More
I talk with so many people who have small businesses... Read More
If you haven't made the sales and built your clients... Read More
If you're anything like most small business owners, you probably... Read More
So you finally decided to invest in a web presence... Read More
Mini Websites are the most powerful and cost effective solution... Read More
I am just a learner who likes to delve in... Read More
Fantastico is a 3rd-party cPanel add-on and can be purchased... Read More
In the region where my company is located, South Bend,... Read More
Many executives and investors are skeptical that software products can... Read More
Web templates by nature are created to aid and ease... Read More
1. As the first step, "Hire a web designer."First create... Read More
Recently I was reviewing the keyword specific conversion rate data... Read More
The DDA (Disability Discrimination Act) states that service providers must... Read More
Now that you have got your domain name registered, your... Read More
Having an eye catching website is great, but are you... Read More
Go to any internet marketing forum you want these days... Read More
Analyzing traffic to a site is a key factor in... Read More
I recently helped my mom to launch a website (www.mom2me.com)... Read More
1) Word of Mouth The single most powerful form of... Read More
Design and layout can make your communication come alive and... Read More
How can we add Word Rich Content to our Websites... Read More
Here's something you may never have thought of before:If I... Read More
"How do I improve web site sales figures?" The CEO... Read More
If you are looking for creating your online presence you... Read More
For years now I've been looking to start my own... Read More
So your traffic is going through the roof yeah? It's... Read More
The internet has taken over our lives with a vengeance,... Read More
Part of the success of most home-based businesses is their... Read More
Launching a new small business website is often a long... Read More
Although there are significant differences among the various types of... Read More
Your site is fast and getting traffic, but conversion rates... Read More
We've all seen those messages on some websites warning not... Read More
Creatively marketing your corporate site takes time in the set... Read More
Web Development |