[mapguide-users] MapDefinition from runtime map

Kenneth Skovhede, GEOGRAF A/S ks at geograf.dk
Tue Jul 28 03:21:33 EDT 2009


I don't think such a method exists.
It should be fairly straightforward to itterate the layers
and construct a MapDefinition though.

An alternative approach is to simply save the runtime map.
Just create a dummy resource in the repository,
and save the runtime map as "resource data".

You can use MaestroAPI to get the runtime map as a binary.

The tricky part is loading the runtime map.
If you use the AJAX viewer, you must edit the file and skip the
part where it creates the runtime map, and then load the map instead.

The drawback to this approach is that primary keys etc. are saved, and
won't be updated when you load the runtime map.

Regards, Kenneth Skovhede, GEOGRAF A/S



Gunter Becker skrev:
> Hi all,
>
> what ist the easiest way to get an MapDefinition from an users runtime map.
> My purpose is to save the users runtime map in Library after he has added
> some layers to the map and maybe has changed the visibility of the layers.
>
> Until now I had static maps and it was easy to compare the runtime map with
> the mapdefinition and set only the visibility. But the more I give the user
> the chance to change the runtime map (add layers) the more it will become
> complicated.
>
> So, is there somewhere (maybe in MaestroAPI) such an methode or are there
> somewhere examples to achieve that?
>
> Thanks in advance,
> Gunter
>   


More information about the mapguide-users mailing list