-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support partial application state in the URL (was: Enhancement Requests) #481
Comments
We basically need to integrate a router component (or a clean wrapper over |
I am no professional in founding the best application state encoder, but hope you or others may provide decent suggestion. Something like react-url-query? |
Hey, you're good at this library hunting thing! I'll take a look at this. |
…s react-url-query to selectively auto-sync state into the URL. The state that is currently pushed to the URL is: - Session ID - Current View (x/y/scale) - Current active map NOTE: Modifying the URL and hitting enter will do a full refresh, but will incorporate the URL parameters in (re-)initializing the application.
…E, but the URL state propagation doesn't work here anyways, which is fine for now. We just don't want it to error startup in IE.
Ok, Observe the Currently this pushes to the URL:
This doesn't work at the moment in IE. But I'm not overly concerned there. Not everything can be made to work in IE. |
- Use deterministic map names - For Flexible Layouts, this is the map group id - For Web Layouts, this is the name of the referenced map definition - With deterministic map names we can now push the current active map name to the url state. - When loading if map parameter is present, we DESCRIBERUNTIMEMAP instead of CREATERUNTIMEMAP on viewer init, allowing us to resume with the map state we left off.
The question of how best to persist selection state in the URL we'll move off to the next milestone |
For 0.12 the missing piece of application state (selection set) is now persisted between browser reloads. We just stash a copy of the selection set into local storage on every selection action and restore it along with the other runtime map state on viewer startup if the browser reloaded. |
Hi Jackie,
Here are the features that I always wish MapGuide/AIMS Fusion will provide by default:
Layers/Layers Groups turn on/off history stored with URL parameters. Therefore, the users may share the URL with each other, and refresh the web page without turn on/off whole bunch layers or layer groups (including base layers) again.
ex: hg=Cadastral,Zoning&hl=Roads&sl=QBIncorporationHistory,QBZoning
Current map extent can be stored with URL parameters, and keep being updated when the user zoom in/out, panning around the map.
ex: curextent=-13854516.504702,6334618.2438916,-13853592.691556,6335079.2547184
Auto Select and Zoom to the extent of selection by using URL parameters.
https://mapguide.wordpress.com/2013/06/11/autodesk-infrastructure-map-server-auto-zoom-on-load/
ex: layer=QBParcels&attribute=QBID&attvalue=1012,1013
I just think these are really handy features to have. or please just let me know what codes should I modify with mapguide-react-layout.
Please let me know your thoughts.
Thank you for building mapguide-react-layout!
The text was updated successfully, but these errors were encountered: