Open hanbyul-here opened 7 years ago
Good question. We intentionally left the attribution overwrite-able, but there is an argument to be made that we have a responsibility to OSM to make sure they are attributed properly, as well as a responsibility to our users to make it as easy as possible to follow our own attribution requirements.
So, I'm OK with making our attribution harder to remove.
We should also take this opportunity to review how we're handling attribution within individual components. @hanbyul-here - it looks like you have an open PR to remove the specific geocoder attribution -- thank you; I think that's the right move (at least until such time that we allow a geocoder w/o map).
We are also allowing specific attribution via tangramOptions
, which gets appended to the end of the attribution. This is an artifact from allowing all Tangram and Leaflet options to pass through tangramOptions
.
Example:
var map = L.Mapzen.map('map', {
tangramOptions: {
attribution: 'attribution via tangramOptions' // appended after Leaflet attribution
},
attribution: 'attribution via options' // Overwrites our existing Mapzen attribution
});
I'm inclined to leave that one for now, because it's not overwriting anything (and is unlikely to even be used due to lack of documentation/examples).
Moving forward, I propose we use one of the following formats for attribution that is passed in via the options object:
© Mapzen, OpenStreetMap, and others | Leaflet | User-provided attribution
or
User-provided attribution | © Mapzen, OpenStreetMap, and others | Leaflet
(Assume those have the appropriate links ☝️) Any preferences?
Technically, Leaflet isn't required: https://groups.google.com/forum/#!topic/leaflet-js/fA6M7fbchOs
Oh, that's a good reminder. Because mapzen.js is built on Leaflet and passes Leaflet options, you can also turn off the attributionControl entirely:
var map = L.Mapzen.map('map', {,
attributionControl: false
});
I think User-provided attribution | © Mapzen, OpenStreetMap, and others | Leaflet is the format what I expect to see when I pass the attribution. I left this comment on the closed pr too, but I think it is good not to encourage users to use each of component's attribution control? since the order of each attribution can be mixed and confusing?