[mapguide-users] React Layout - mount viewer

Jackie Ng jumpinjackie at gmail.com
Mon Jan 18 00:01:43 PST 2021


When the viewer mounts, it checks for any of the following query string
parameters during init:

https://github.com/jumpinjackie/mapguide-react-layout/blob/master/src/containers/url-state.ts#L7

If you provided "session" it will use that value as the session id.
If you provided "resource" it will fetch that app def content pointed by
that resource id and [create or restore] the runtime map inferred by the
name of the referenced map definition.

All other query string parameters on that list are to init/re-establish the
current view and toggled layers/groups of the active map.

This is how the viewer can "survive" a F5 browser refresh. All relevant
state is pushed into the URL through these query string parameters and that
is the first place the viewer will look when deciding how to init itself.

- Jackie



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html


More information about the mapguide-users mailing list