[mapguide-users] MapGuide Fusion API - turn on/off Layers or LayerGroups and Query

RenoSun renolionheart at gmail.com
Fri Mar 13 14:13:43 PDT 2015


Hi guys,

I did following Java Scripts to turn on the layers in my fusion html.

var mapWidget = Fusion.getMapById('Map');
 mapWidget.aMaps[0].getLayerByName('LayerName').show();

, and it works. 

However, after above codes I did "mapWidget.query(options);", and it won't
select the features of the layer just turned on. 

All my codes are under var nitPanelHandler = function () {.....}. Should I
put it here or other places?

Does anyone know the codes to turn on/off the map layer groups by using
Fusion API?

I imagine the codes will look like
"mapWidget.aMaps[0].getLayerGroupByName('LayerName').show();", and I also
tried to find the API reference for the solution. However, I have no luck so
far.

Thanks for all your helps!



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/MapGuide-Fusion-API-turn-on-off-Layers-or-LayerGroups-and-Query-tp5193321.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list