Re: [mapguide-users] Problem opening a webLayout with predefined selection
Yes, I understand. Forget my ramblings :). Regards, Kenneth Skovhede, GEOGRAF A/S Bruno Scott skrev: The "CreateSession" is allways called with or without my patch The check for existing items is always empty excepts if i call the mapviewerajax with an existing session. Bruno ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Problem opening a webLayout with predefined selection
Kenneth Skovhede, GEOGRAF A/S wrote: > > If you get a new sessionid, that means that the "CreateSession" is being > called. > Then the check for existing items will look in the new session, which is > always empty? > The "CreateSession" is allways called with or without my patch The check for existing items is always empty excepts if i call the mapviewerajax with an existing session. Bruno -- View this message in context: http://www.nabble.com/Problem-opening-a-webLayout-with-predefined-selection-tp21035935p21055607.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Problem opening a webLayout with predefined selection
zspitzer wrote: > > are you using username & password or passing in a session id in the url? > Hi Zac Actually my own page got the username and password in the url In this page i create the session, sets the centerx,centery and scale of the weblayout Initialize the selection Then i open the mapviewerajax url with the sessionid i've created Bruno -- View this message in context: http://www.nabble.com/Problem-opening-a-webLayout-with-predefined-selection-tp21035935p21055367.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Problem opening a webLayout with predefined selection
If you get a new sessionid, that means that the "CreateSession" is being called. Then the check for existing items will look in the new session, which is always empty? Regards, Kenneth Skovhede, GEOGRAF A/S Zac Spitzer skrev: are you using username & password or passing in a session id in the url? z On Thu, Dec 18, 2008 at 12:13 AM, Bruno Scott wrote: By pressing F5, the sessionid get renewed I tested it in IE and firefox -- View this message in context: http://www.nabble.com/Problem-opening-a-webLayout-with-predefined-selection-tp21035935p21052889.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Problem opening a webLayout with predefined selection
are you using username & password or passing in a session id in the url? z On Thu, Dec 18, 2008 at 12:13 AM, Bruno Scott wrote: > > By pressing F5, the sessionid get renewed > I tested it in IE and firefox > -- > View this message in context: > http://www.nabble.com/Problem-opening-a-webLayout-with-predefined-selection-tp21035935p21052889.html > Sent from the MapGuide Users mailing list archive at Nabble.com. > > ___ > mapguide-users mailing list > mapguide-users@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapguide-users > -- Zac Spitzer - http://zacster.blogspot.com +61 405 847 168 ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Problem opening a webLayout with predefined selection
By pressing F5, the sessionid get renewed I tested it in IE and firefox -- View this message in context: http://www.nabble.com/Problem-opening-a-webLayout-with-predefined-selection-tp21035935p21052889.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Problem opening a webLayout with predefined selection
If you press F5, the selection won't be reset with your patch? Regards, Kenneth Skovhede, GEOGRAF A/S Bruno Scott skrev: Hi kenneth What do you meen by "Reload button"? The actual behavior is When a user Hit the F5 key ( or refresh the browser ), everything is lost, the selection, the current zoom... and When a user use the Refresh Map Action, the zoom, the selection , the layers on/off are kept in the same state With my proposed patch, it works the same. Is there something i missed? Bruno ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Problem opening a webLayout with predefined selection
Hi kenneth What do you meen by "Reload button"? The actual behavior is When a user Hit the F5 key ( or refresh the browser ), everything is lost, the selection, the current zoom... and When a user use the Refresh Map Action, the zoom, the selection , the layers on/off are kept in the same state With my proposed patch, it works the same. Is there something i missed? Bruno -- View this message in context: http://www.nabble.com/Problem-opening-a-webLayout-with-predefined-selection-tp21035935p21051557.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Problem opening a webLayout with predefined selection
Nice idea. You could do the same with the runtime map, which would ease the pre-creation/modification of maps. If the user presses the reload button, the map would stay the same, as would the selection. Is this a problem, and do you have and idea for a workaround? Regards, Kenneth Skovhede, GEOGRAF A/S Bruno Scott skrev: I could propose a patch to fix that problem The idea would be to verify if the Session://...MapDefinition exist If it already exist, do not overwrite Something like this bool mapStateIdExist = true; MgResourceIdentifier mapStateId = new MgResourceIdentifier("Session:" + sessionId + "//" + mapName + "." + MgResourceType.Map); try { MgByteReader tmpReader = resourceSrvc.GetResourceContent(mapStateId); } catch(MgException mge) { mapStateIdExist = false; } Then use the mapStateIdExist flag //if MapStateId exist, we should not erase the selection if(!mapStateIdExist) { //create an empty selection object and store it in the session repository MgSelection sel = new MgSelection(map); sel.Save(resourceSrvc, mapName); } and //if MapStateId exist, we should not overwrite it if(!mapStateIdExist) { map.Save(resourceSrvc, mapStateId); } ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Problem opening a webLayout with predefined selection
I could propose a patch to fix that problem The idea would be to verify if the Session://...MapDefinition exist If it already exist, do not overwrite Something like this bool mapStateIdExist = true; MgResourceIdentifier mapStateId = new MgResourceIdentifier("Session:" + sessionId + "//" + mapName + "." + MgResourceType.Map); try { MgByteReader tmpReader = resourceSrvc.GetResourceContent(mapStateId); } catch(MgException mge) { mapStateIdExist = false; } Then use the mapStateIdExist flag //if MapStateId exist, we should not erase the selection if(!mapStateIdExist) { //create an empty selection object and store it in the session repository MgSelection sel = new MgSelection(map); sel.Save(resourceSrvc, mapName); } and //if MapStateId exist, we should not overwrite it if(!mapStateIdExist) { map.Save(resourceSrvc, mapStateId); } -- View this message in context: http://www.nabble.com/Problem-opening-a-webLayout-with-predefined-selection-tp21035935p21049538.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users