Home | Site Map           
   
     

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


MORE RESOURCES:

website design - Yahoo! News Search Results
website design - Yahoo! News Search Results

Elliottsweb, a Chicago Website Design Company, Welcomes Its Newest Internet M...
CHICAGO, IL-- - Elliottsweb, a Chicago website design company, would like to kindly welcome its newest website design and search engine optimization clients:Kurt Hermanni is an experienced Miami immigration ...
GiftCards.com Releases New Site Design
PITTSBURGH, Feb. 3, 2012 /PRNewswire/ -- GiftCards.com is excited to announce the release of their new website re-design at www.giftcards.com .  The new layout is designed to provide easier access to all ...
Roadside Multimedia Announces the Launch of FastTrak Dental Website Design
Roadside Multimedia is thrilled to introduce FastTrak, a new dental website design option for those who may not be in the market for a fully custom website. These websites will fit the style and budget of many dental practices while still providing the strong online presence needed to promote any business.(PRWEB) January 31, 2012 FastTrak is an exciting new website design option from Roadside ...
Long Island Web Designers, Benjamin Marc Recently Launches New Webpage Explai...
Long Island Website Design Company Benjamin Marc explains a step by step process to design & development.Lake Grove, NY (PRWEB) February 01, 2012 Long Island Web Designers, Benjamin Marc recently launches new webpage explaining step by step what to expect when hiring them.The new web page starts off explaining the process of being a new client of Benjamin Marc. It always begins with a free ...
Page 1 Solutions Promotes Three Employees within their Website Design and Dev...
Page 1 Solutions recently promoted three of their employees to new positions within their design and development department.Golden, Colorado (PRWEB) January 31, 2012 Page 1 Solutions is happy announce the promotion of three of their employees within the company. Tim Hankinson was just promoted to a Website Developer position, Stacey Ball has been promoted to Senior Front End Developer, and ...

 

 

Food     PeoplesChoice | Web Starter | PhotoLog | Workstations | Web Design | Photo Blog | Articles Searches | Daily Blog     MP3

Copyright © 2008 All Rights Reserved TheWebStylist.com