[mapguide-users] MapDefinition from runtime map

Gunter Becker gunter.becker at csogis.de
Tue Jul 28 04:16:32 EDT 2009


Your second approach sounds good to me.
 
I think that it don't take much time to save the map that way in opposition
to the first approach.
What ResourceType does the dummy resource should have?

The only concern I have is that I can't do much validation (eg. resources
exists) before displaying the map. But I don't know if validation makes
sense at all because of the time it takes to validate all layers
in a map. I'm talking of 100 - 200 layers. What do you think!

Gunter  


Kenneth Skovhede, GEOGRAF A/S wrote:
> 
> 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
>>   
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> 
> 

-- 
View this message in context: http://n2.nabble.com/MapDefinition-from-runtime-map-tp3333596p3340439.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list