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/
Chicago limo Skokie ..Setting up a website is the very first step of... Read More
When I set up my website I felt paypal was... Read More
Most people know they need a website in order to... Read More
1) Word of Mouth The single most powerful form of... Read More
So you finally decided to invest in a web presence... Read More
Building a website and getting it online is easy. Driving... Read More
One of the things that many people overlook when building... Read More
In the big, wide online world there are millions of... Read More
Keywords in Search Engine Optimizing and Search Engine Marketing are... Read More
You've decided to create a website to market your products... Read More
Below, I have listed 8 simple steps that you can... Read More
As a business you can't afford to ignore the Internet... Read More
Most interactive websites nowadays require data to be presented dynamically... Read More
Webmasters deal with a myriad of complex design challenges every... Read More
It amazes me how many people try to build serious... Read More
Part of the success of most home-based businesses is their... Read More
Starting a business online is no longer as difficult as... Read More
"Don't Sell the Steak, Sell the Sizzle."Have you heard of... Read More
Can you imagine the hypocrisy of spending thousands of dollars,... Read More
Did you know that hosting companies overcrowd their servers despite... Read More
We've all seen those messages on some websites warning not... Read More
If you're an up and coming graphic/web designer just out... Read More
Many small businesses have the misconception that their business can... Read More
Getting a Targeted Visitor to a website is a waste... Read More
Here's something you may never have thought of before:If I... Read More
limo O'Hare Bonfield ..A lot has changed in the way sites are optimized... Read More
What is the most important part of your online business?Many... Read More
The Internet has opened a whole New World of opportunity... Read More
While creating a Web site may seem like... Read More
Does My Web Site Require A Web Database?If your web... Read More
An Introduction to Server Side IncludesBeginner? That's OK!While much has... Read More
Web templates by nature are created to aid and ease... Read More
The following is a list of patterns that many visitors... Read More
When we review the sites of potential clients, there are... Read More
An automated accessibility tool is a piece of software which... Read More
Having an eye catching website is great, but are you... Read More
Q. Hey, Cathy: I'm just setting up a website. What... Read More
Any new website competing on the internet, needs to take... Read More
When you publish a content site there are times when... Read More
Yahoo has long offered email, an online calendar, notes, bookmarks,... Read More
Although CSS layouts have been around for years, they haven't... Read More
After planning the design and content of your website, it's... Read More
Spend time planning your Web site. Before you design a... Read More
I can't think of any business alive today that couldn't... Read More
If you are developing your website on a host that... Read More
Creating and maintaining an effective presence on the Web has... Read More
The Disability Discrimination Act states that service providers must not... Read More
The growth in Internet usage around the world is astounding... Read More
Just starting out, you can start with a simple informational... Read More
A common dilemma most small and medium businesses face when... Read More
Web Development |