[mapguide-users] change layer definition runtime
makoychan at yahoo.com
Tue Sep 6 21:08:33 PDT 2016
I think i got the gist, but will this also work with fusion? I am currently using the fusion templates. I was wondering if i could also do this with .net to rebuild the mapdefinition or layer definition.
Thanks for the response, im a bit stuck on this.
Sent from Yahoo Mail on Android
On Wed, Sep 7, 2016 at 12:03 AM, Jackie Ng<jumpinjackie at gmail.com> wrote: You have to manipulate MgMap/MgLayer objects, so you have to use a
server-side script. It doesn't have to be .net. It could be in Java or PHP.
But it has to be one of the 3 languages which can work with the MapGuide Web
Your script needs to take in mapname/sessionid and do the following:
- Opens the MgMap from the mapname
- Finds the matching MgLayer in the map's layer collection by its layer
- Make a new MgLayer that points to your new layer definition
- Replace the matching MgLayer with your new MgLayer
- Insert the new MgLayer to the layer collection at the matching index of
the old MgLayer
- Remove the old MgLayer from the layer collection
- Save the map state and trigger a map refresh back on the client-side
View this message in context: http://osgeo-org.1560.x6.nabble.com/change-layer-definition-runtime-tp5284382p5284422.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
mapguide-users mailing list
mapguide-users at lists.osgeo.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mapguide-users