[mapserver-users] Mapserver data point on map
newmapserver
alexis.vandevoorde at meteoconsult.com
Wed Jan 4 06:02:11 PST 2017
Hello and happy new year !
Currently, I place points (lat / lon) on a map using a mysql query. At each
point is associated an image according to the type of places considered.
Today, I would like to retrieve my information either thanks to Mysql but
thanks to an API. I use the function "addPoints" to adding features to a
layer :
*A part of script : *
$point = ms_newPointObj();
$line = ms_newLineObj();
$shape = ms_newShapeObj(MS_SHAPE_POINT);
$point->setXY( $lieu->longitude_metre, $lieu->latitude_metre);
$line->add($point);
$shape->add($line);
$shape->set("text","ici");
$class = ms_newClassObj($layerprevision);
$class->setExpression("rot");
$style = ms_newStyleObj($class);
$style->color->setRGB(255, 0, 0);
$layerprevision->addFeature($shape);
I'm trying to set a simple "text" on each point but...nothing is displayed.
Do you have an idea to solve this problem?
Thank you in advance !
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Mapserver-data-point-on-map-tp5301975.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
More information about the MapServer-users
mailing list