Mapserver / Mysql
Julien-Samuel Lacroix
jlacroix at DMSOLUTIONS.CA
Mon Jan 31 08:04:00 PST 2005
Hi,
You can either use a Virtual Data Source to load MySQL data in MapServer
directly:
http://ogr.maptools.org/drv_vrt.html
Or dynamicly draw the points on your image using mapscript:
// (Example in PHP)
// Load the data from MySQL using PHP
// Then draw the map to get an imageObj
// Then:
$point = new pointObj();
$point->setXY($lon_from_mysql, $lat_from_mysql);
$point->draw($map, $layer, $img, $class, $label);
//Check
http://mapserver.gis.umn.edu/doc42/phpmapscript-class-guide.html#pointobj
Julien
Nishant Chandra wrote:
> I have mapserver and mysql installation on windows.
>
> I use the .shp/.dbf file to generate the base map. what i want is to read
> some coordinates and names from Mysql db and project it onto the map already
> rendered. can some1 give me an example code to query mysql and the map file/.
> phtml file.
>
--
------------------------------------------------------------
Julien-Samuel Lacroix jlacroix at dmsolutions.ca
DM Solutions Group http://www.dmsolutions.ca/
------------------------------------------------------------
More information about the MapServer-users
mailing list