-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Make hash configurable #8596
Comments
@SebCorbin Thanks for the proposal. Would you be interested in implementing it as well? The changes should be limited to https://github.com/mapbox/mapbox-gl-js/blob/master/src/ui/hash.js and fairly isolated to test. |
Sure, I have a PR in progress, I think I'll drop the |
Related to #7725. I like this approach to make it more flexible and let the developer choose the name they want to use. |
I'm very glad to see this -- please consider also allowing the named form as a input only alternative, ideally on by default. That way all maps using mapbox-gl will automatically be able to accept pasted-in URLs from OSM without barfing. |
was closed by #8603 |
Motivation
Hash option is a boolean, if we set it, we can't use
location.hash
for anything else other than the mapbox hash. It would be nice to implement a query parameter style, if defined, likemyurl.org/mymap#map=10.37/14.589/-61.0225&config=myotheroptions
.This is useful for permalinks for application containing a configurable map of anything else actually.
Design Alternatives
Add an optional (to prevent breaking change)
hashName
option, that if defined, make the hash a query parameter-styled string.Implementation
Add and document this option, modify
ui/hash.js
so that it replaces (if defined), only thehashName
part of the map.The text was updated successfully, but these errors were encountered: