[mapguide-users] Turn Layers On/Off of The Legend - FusionSF.js - AIMS2017/MapGuide3.1
RenoSun
renolionheart at gmail.com
Mon Nov 20 16:09:59 PST 2017
Hi all,
Does anyone facing the issues to turn on/off layers or layer groups by using
FusionSF.js?
I am using turquoiseyellow template, and I wrote following codes in order to
turn on/off the layers or layer groups based on the URL parameters. It was
working with Fusion 2.6 build. The check boxes of the layers
unchecked/checked were successfully.
turquoiseyellow/index.html
var mapWidget = Fusion.getMapById('Map');
if (mapWidget && mapWidget.isMapLoaded()) {
//Turn on/off specific layers/layer groups based on URL
parameters
// ex: getParamFromTop('sl') = 'Roads'
var sllist = decodeURIComponent(getParamFromTop('sl'));
...
mapWidget.aMaps[0].getLayerByName(getParamFromTop('sl')).show(bool);
...
However, I think AIMS 2017 is using new build like Fusion 3.0/3.1.
Then, I got following error message:
<http://osgeo-org.1560.x6.nabble.com/file/t368332/Error.png>
<http://osgeo-org.1560.x6.nabble.com/file/t368332/Error2.png>
--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
More information about the mapguide-users
mailing list