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/
personalized cleaning services Des Plaines ..Affiliate programs are a great way to earn an income... Read More
Failure, just like success, is measured differently by each and... Read More
Customer service questionnaires can help your clients better understand their... Read More
Better Web Site ROIHow to increase your business profitability by... Read More
Huge Mistake #1: Creating a Website with Flash -- Did... Read More
Many of site owners still don't realize all advantages of... Read More
The first thing my business consultant (read brother-in-law) asked me,... Read More
A lot has changed in the way sites are optimized... Read More
When we review the sites of potential clients, there are... Read More
When you purchase a new item from a Yahoo! Store,... Read More
You work hard to build traffic to your web page.... Read More
When you consider the billions of individuals and companies on... Read More
There have been many significant changes to the face of... Read More
Starting a business online is no longer as difficult as... Read More
Anyone who knows anything about web accessibility knows that images... Read More
RIVERSIDE, CA August 4, 2004 ?- "Historically, small business owners... Read More
Part of the success of most home-based businesses is their... Read More
The process of Web application development is critical to the... Read More
The internet has taken over our lives with a vengeance,... Read More
This simple question can take on several different forms, but... Read More
No matter the size of your business, having a web... Read More
Before you jump into spending coutnless hours on designing and... Read More
QUESTION: Should I build and maintain my business Web... Read More
Whether you have your own business already, or are looking... Read More
What to do if you are an artist after you... Read More
family-safe home cleaners Arlington Heights ..Thinking about starting up a business? The web is the... Read More
This is a growing concern amongst many business owners. Does... Read More
I recently helped my mom to launch a website (www.mom2me.com)... Read More
I've heard several prominent web marketers mention in their classes... Read More
Three way linking and concerns.For many years SEO experts were... Read More
SummaryHere's the scoop on what you must know when designing... Read More
Does your website have a links/resources page?Do you exchange reciprocal... Read More
If one more business owner tells me their website sucks... Read More
They might not be wearing a mask and carrying a... Read More
Every good Internet business understands the value of conversions versus... Read More
If you are developing your website on a host that... Read More
One of the best tools you have as a webmaster... Read More
When marketing your website, it's important to know which of... Read More
Thousands of people are now making a living online and... Read More
One of the biggest mistakes that most online retailers make... Read More
Designing and creating your own website does not have to... Read More
It never ceases to amaze me how many people set-up... Read More
1. As the first step, "Hire a web designer."First create... Read More
1. Splash pagesMost of the time splash pages are uncalled... Read More
That's right. According to a recent study by Nielsen/NetRatings, Amazon.com... Read More
That's right. Your method, behavior and strategy you are now... Read More
Have you ever wondered what challenges are faced by other... Read More
An additional benefit of website accessibility is an improved performance... Read More
"Don't Sell the Steak, Sell the Sizzle."Have you heard of... Read More
The internet is a sea of knowledge. Getting your information... Read More
Web Development |