this is how I do it:
AJAX request:
open the session map set the visibility of the layer and possibly the groups recursively to true, save the session map.
After response: refresh the map.
This works with the fusion viewer.

But in the legend of the react layout the layer remains not visible (not checked) and the next request GETDYNAMICMAPOVERLAY contains this layerid in the parameter hidelayers.
so my idea was toggle the checkbox in the legend but don't no how.
setLayerVisibility(layerid, true) or setLayerVisibility(mapname, {id: layerid, value: true}) both don't work.
 
Gesendet: Montag, 05. Juli 2021 um 19:49 Uhr
Von: "Gordon Luckett" <gordon.luck...@arrowgeomatics.com>
An: "MapGuide Users Mail List" <mapguide-users@lists.osgeo.org>
Betreff: Re: [mapguide-users] React Layout - set layer visibility
Normally I would call the server side request to toggle the layer visibility with a _javascript_ ajax call
 and then just use _javascript_ to refresh the map without reloading the page.
 
 
 
On Mon, Jul 5, 2021 at 4:47 PM Svlad <svlad.cjell...@web.de> wrote:
Hi, how can I programmatically change the visibility of a layer?
I modified and saved the map on server side but the viewer allways sends "hidelayers= layerid" in the request.
Is it possible top change the visibility on the client side?
Thanks svlad
 
_______________________________________________
mapguide-users mailing list
mapguide-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapguide-users
_______________________________________________ mapguide-users mailing list mapguide-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapguide-users
_______________________________________________
mapguide-users mailing list
mapguide-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapguide-users

Reply via email to