HOW TO DRAW ICONS OR IMAGES ON A MAPSERVER GENERATED MAP
(c)2005 by Roberto Colonello - Parsec Tech srl

 

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 map
(C)2005 Roberto Colonello
Parsec Tech srl
39012 - Merano (BZ) - ITALY
roberto@parsec.it