Web Development Information

How to Draw Icons or Images on a Mapserver Generated Map


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 codeHere 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


MORE RESOURCES:

Frugal Duchess: Goal-setting
Bellingham Herald, WA - 19 hours ago
Goal setting is an annual exercise as we try to whip our home and other fiscal assets into better shape. And so we crunch numbers and try to tone up our ...


Goal-Setting Drills Make for More Active Coworkers
Newswise (press release) - Jan 5, 2009
“They had individual goal setting — a common technique — but they also had group and organizational goal setting, which provided the peer encouragement that ...
Employer-Sponsored Workouts Boost Workers' Health Washington Post
all 17 news articles


Missoula officials offer New Year's goal setting tips
KPAX-TV, MT - Jan 2, 2009
Missoula City-County Health officials say the new year is a great time to re-commit to new health goals. Here are some goals they recommend striving for ...


Woman Who Lost 100 Pounds Opens Goal-Setting Social Network
PR.com (press release), NY - Jan 2, 2009
Woman who lost 100 pounds shares how to set and achieve your goals through a new goal-setting social network site whose launch date coincides to help make ...


HealthNews

Goal-Setting Tips for the Whole Family
HealthNews, CA - Dec 29, 2008
Goal setting is an important method of deciding what’s important in your life. Since accomplishing these goals builds self-confidence, goal setting is a ...


1/6/2009 - CAP Seminars Focus on the Self and Home
Inland Empire, CA - 18 hours ago
Goal Setting from instructor Letty Herndon teaches how to set specific, attainable and measurable goals that are both realistic and time-bound. ...


Setting effective financial goals for 2009
The Punch, Nigeria - Jan 3, 2009
For instance, Dr. Ron Dontroy, a leading human resource expert and author, The Art of Future Management, likens goal setting to a compass that provides the ...


Goal setting Pacers eye Fraser Valley berth
South Delta Leader, Canada - Jan 1, 2009
By Philip Raphael - South Delta Leader Weeks into the senior girls basketball season, Delta Secondary head coach Bill Lambert says his team is still in ...


Dining Out: Local burger joints excel at comfort food
Salt Lake Tribune, United States - 46 minutes ago
... a total disregard of medical advice or personal goals, especially at a time when most people have gone through some introspection and goal-setting. ...


Examiner.com

Goal setting for 2009: book projects
Examiner.com - Dec 29, 2008
by Wendy Attmore, Atlanta Writing Careers Examiner Now’s the time to start mapping out some self-imposed deadlines for your book projects. ...

Goal-Setting - Google News

home | site map | ArticleGecko | A ClashX Production 2006
© 2006