Skip to content
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

Permalink Control #589

Closed
bartvde opened this issue Apr 19, 2013 · 6 comments
Closed

Permalink Control #589

bartvde opened this issue Apr 19, 2013 · 6 comments

Comments

@bartvde
Copy link
Member

bartvde commented Apr 19, 2013

No description provided.

@elemoine
Copy link
Member

ol.RendererHints.createFromQueryData, which we currently have, is relevant to the discussion. It's also not clear whether the permalink feature will be implemented as a control. Currently ol3 controls have HTTP markup.

@twpayne
Copy link
Contributor

twpayne commented Feb 28, 2014

I think that we all agree that this should be the responsibility of the application. Please re-open if you disagree.

@twpayne twpayne closed this as completed Feb 28, 2014
@Matthias84
Copy link

I don't think that this should just be part of the application itself. The OL framework should provide best practises for GIS related standards, which IMHO also includes permalink url shortcuts. V 2.x had also this feature, is there a good reason to keep it seperated and to force devs to code their own implementation?

@elemoine
Copy link
Member

I don't think that this should just be part of the application itself. The OL framework should provide best practises for GIS related standards, which IMHO also includes permalink url shortcuts. V 2.x had also this feature, is there a good reason to keep it seperated and to force devs to code their own implementation?

I think there is a good reason: there are many ways to implement permalinks. For example, the map state may be encoded in the query part of the URL, or in the hash part of the URL (after the # sign). Also, one may want to use the history API, or think that it does not make sense that forward/backward buttons navigate through the map history. There are many different use-cases. So I don't think OpenLayers 3 can/should have an opinion on the way the map state should be encoded in the URL and, more generally, on the way permalinks are created and behave.

See http://openlayers.org/en/master/examples/permalink.html for an example.

@Matthias84
Copy link

It's true, as you write there are a lot of ways to accomblish this features. So customization is a must.

BUT I see also good reasons to include a ready-to-use feature for permalinks:

  • interoperability - e.g. you can easily share views across multiple plattforms as a lot of OSM pages with OL v2 do
  • it saves time for people not that familar with JS coding
  • it was included in v2.

@probins
Copy link
Contributor

probins commented Apr 26, 2015

I agree with @elemoine. The OL2 permalink dates from the early days of web mapping, when maps were much simpler than they are now. OSM still has a simple model, with just a couple of tile layers, no vectors, and not much 'map state' to store. It now uses Leaflet, though this doesn't provide a permalink either; its link share is site-specific. You're assuming that all maps have such a simple structure, but an OL3 map can have layers with different opacity/visibility/brightness/etc; it can have numerous vector layers, which may be clustered, have different styling, and/or be labelled; the vector data may be volatile, in which case you probably want some kind of caching or storage rather than a link. How much of all this you want to reproduce when sharing maps is going to be application-specific, and probably impossible to define in a simple link anyway. Personally I use a JSON object to store map definitions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants