tangrams / tangram

WebGL map rendering engine for creative cartography
https://tangram.city
MIT License
2.2k stars 290 forks source link

If no explicit attribution in leafletLayer, use attribution in YAML sources #763

Closed bdon closed 4 years ago

bdon commented 4 years ago

This is more similar to the behavior of Leaflet raster tiles where each individual tile layer can have an attribution. Because a TangramLayer can use multiple tile sources, this lets the attribution for each source be specified in YAML, and then these are added together in the case that no explicit 'attribution' prop is passed to LeafletLayer.

bcamper commented 4 years ago

I like this, it reminds me that I have wanted to have more formal scene-level metadata properties defined (though source-level makes sense here).

@matteblair @tallytalwar I don't know if there's anything we would need explicitly here on the ES side, minimally to expose these values in the API? We don't otherwise have a built-in attribution display do we?

matteblair commented 4 years ago

Tangram ES still doesn't have any integrated form of attribution - but we should! Per-source and per-scene attribution strings make sense to me. We can certainly ingest those strings from the scene configuration, we just don't have anywhere to show them right now. A simple approach could be to create a native text window for the attribution and let the user customize it from their app.

tallytalwar commented 4 years ago

I like it too.. I have a vague memory for doing this or at least discussing approaches for eraser-map..

On Sat, Jul 25, 2020, 10:47 PM Matt Blair notifications@github.com wrote:

Tangram ES still doesn't have any integrated form of attribution - but we should! Per-source and per-scene attribution strings make sense to me. We can certainly ingest those strings from the scene configuration, we just don't have anywhere to show them right now. A simple approach could be to create a native text window for the attribution and let the user customize it from their app.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tangrams/tangram/pull/763#issuecomment-663938915, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACYBQJIONF57X6SVMCXXXDR5O7OZANCNFSM4OYFNIQA .

bcamper commented 4 years ago

I made some very minor changes in 6ee8598 to match Tangram code style (some aspects of which I wouldn't pick for a new project today, but... it's the style we have aimed for consistency in for the project's lifespan).

bcamper commented 4 years ago

Switched Nextzen demo attribution to use this in 365bb6e65d6bc6713123de908231984e587d73c3 🙌

nvkelso commented 4 years ago

Could you also add in Data from OpenStreetMap and Who's On First, as well?

bcamper commented 4 years ago

Could you also add in Data from OpenStreetMap and Who's On First, as well?

Done! We should add directly to the Nextzen basemaps as well.