[mapserver-users] getFeatures of the clicked shape
Medve Zsolt
medvezs84 at gmail.com
Thu Apr 1 05:01:26 PDT 2010
Hy !
I have a problem with getting an ID of a shape
This is the code i use:
$layer = $map->getLayerByName('sde1','sde2','sde3','sde4');
if ($layer->getNumResults() == 1) {
$res = $layer->getResult(0);
$layer->open();
$shape = $layer->getFeature($res->shapeindex, $res->tileindex);
$id = $shape->ID;
$layer->close();
}
I,think it puts the ID's of all of the shapes what the spaefile contain.
Am i think right?
How can i put only the clicked shape's ID to the $id variable?
I am able to get the clicked X and Y coords from a Js code, it is
usefull to get the ID of the clicked shape?
Thanks a lot for the answers,
Zsolt
More information about the MapServer-users
mailing list