geomoose / gm3

GeoMoose 3.0 Development. Please submit pull requests to the 'main' branch.
https://www.geomoose.org
MIT License
58 stars 59 forks source link

Track URL in background or only when running Bookmark Tool #797

Open chughes-lincoln opened 1 year ago

chughes-lincoln commented 1 year ago

This isn't necessarily something I think should or shouldn't be done (and I don't know how difficult it would be), but I thought it would be worthy of discussion.

Currently the URL tracks what layers are on and where you are in the map. It might be useful to only create that detailed URL when using the Bookmark tool (or at least give the admin the option to set it that way).

The reason being that end users who aren't familiar with how the program works tend to unintentionally use more than the base URL which overrides any defaults the site admins have set.

For example, the url for the demo is https://demo.geomoose.org/3.x/desktop/. When you go to the demo this updates to https://demo.geomoose.org/3.x/desktop/#on=sketch/default;parcels/parcels;openstreetmap/osm_mapnik&loc=38.2185;-10370523.76;5550954.23. Users tend to bookmark this, or set it to start on startup, rather than bookmarking the base url. As a result if the admin changes any of the defaults, like adding new layers, users don't see any of those changes.

klassenjs commented 1 year ago

That might have some consequences for the forward/back behavior. For testing I like that I can hit reload and recover most of the application state. There might be better ways to do this though.

You might try disabling HashTracker in app.js and see if that gets you what you want.

chughes-lincoln commented 1 year ago

Disabling the HashTracker essentially does what I'd want except it also breaks the bookmark tool that uses the URL (as well as the forward/back behavior and the reload like you mentioned). It may be that changing things causes more harm than good.