[mapguide-users] Get the visible layer properties

yof85 loref85 at yahoo.com.ar
Tue Mar 19 11:20:05 PDT 2013


I tried to use the GetSelectedFeatures of MgSelection, I don't know if my
approach is correct but I got this exception

'Null reference'

- MgMap.GetService() line 94 file
c:\builds\mg22win32\mgdev\common\mapguidecommon\MapLayer/Map.cpp

I did this:

MgSelection sel = new MgSelection(map, selText);
MgReadOnlyLayerCollection selLayers = sel.GetLayers();

for (int li = 0; li < selLayers.GetCount(); li++)
{
    MgLayer selLayer = (MgLayer) selLayers.GetItem(li);

    .....

    MgFeatureReader featurestest = sel.GetSelectedFeatures(selLayer,
featureClassName, false);

}

both selLayer and sel are not null



--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Get-the-visible-layer-properties-tp5041361p5041425.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list