Discussion:
[mapguide-users] MapGuide 3.1 Add or edit the map on Runtime
Mark Volz (LeapCAD)
2017-12-20 08:12:26 UTC
Permalink
Hi,

For those who are upgrading from a 2.x version of MapGuide and can no longer add / edit layers or basically manipulate the map during runtime please read this post around the changes made to the mgmap constructor.

http://themapguyde.blogspot.com.au/2013/03/mapguide-tidbits-mgmap-constructor.html

Basically if your old code has something like:
$map = new MgMap();
$map->Open($resourceService,$mapName);

Then you are going to have to change the way you get a handle on the current map. A very simple example can be found in \mapguide\web\www\<your lang>samples\change_layers_Via_dom.xyz (if you remembered to install the samples).

Hope this helps.

Mark

Loading...