[mapguide-users] MgSelection - highlight selected features in map

Fritz Robert Robert.Fritz at win.ch
Fri Dec 23 00:51:52 PST 2016


Hi,

I query a feature source, create a selection and render a map.
That map should higlight the selected features - but it doesn't and I don't know why. I guess I haven't understood how it works.

I'm not using any viewer - I render the map through a PHP script. I need the script to generate maps in order to get maps into Crystal Reports and other applications (Rest is not an option unfortunately as I sometimes need a feature highlighted, sometimes I dont want it highlighted, GeoRest is slow since I moved to new release).


Here is the code snipped:

$FeatureResId = new MgResourceIdentifier($FeatureResIdString);
$queryOptions = new MgFeatureQueryOptions();
$queryOptions->SetFilter($FILTER);
$featureReader = $featureService->SelectFeatures($FeatureResId, $layerClassName1, $queryOptions);
$selection = new MgSelection($map);
// code for getting coordinates of selected features
...
///
$selection->AddFeatures($myLayer, $featureReader, 0);
$byteReader = $renderingService->RenderMap($map, $selection, $CENTER, $SCALE, $MAPSIZEWIDHT, $MAPSIZEHEIGHT, $BACKGROUNDCOLOR, 'PNG');

Can anyone help me out here?
What needs to be done to get selected features highlighted in a rendered map?

Many thanks, Rob


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapguide-users/attachments/20161223/8e3fa244/attachment.html>


More information about the mapguide-users mailing list