[mapguide-users] modifying map before the WebLayout loads

David Hequet david.hequet at free.fr
Fri Jul 20 05:38:45 EDT 2007


Hi,

I'm using Mapguide Enterprise 2008 / MGOS1.2 and i can't solve this:

I have a frame containing mapguide viewer.
This frame performs VB.net scripts that initialize the Session and
eventually modify the mapdefinition (setting filter's on layer..)

I can Access the map before the WebLayout Load process like this: (assuming
that sessionId and resourceService are well intialized)

Dim aMap As New MgMap()
dim aMapname as String = "MyMapName"

resId = New MgResourceIdentifier(aMapLibraryPath & aMapname & "." &
MgResourceType.MapDefinition)
aMap.Create(resourceService, resId, aMapname)
Dim mapStateId As MgResourceIdentifier = New MgResourceIdentifier("Session:"
+ sessionId + "//" + aMapname + "." + MgResourceType.Map)
aMap.Save(resourceService, mapStateId)

It actually work, i access the MgMap Object, can perform modification. But
when the the layout loads after these modification (via
"http://localhost/mapguide/mapviewerajax/?Session=" + sessionId +
"&WebLayout=Library://myLayout.WebLayout&LOCALE=fr" on my frame) it seems to
re-initialize the MapDefinition :
If i access it and ask about my modified Filters, there back to original
value..
I'm almost sure this code was good working using Mapguide 2007 / MGOS 1.0.

Does the WebLayout Load process changed?
I you have an idea that can help me..
-- 
View this message in context: http://www.nabble.com/modifying-map-before-the-WebLayout-loads-tf4116094s16610.html#a11705193
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list