You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As explained in mapbox/mapbox-gl-native#2723 (comment), native map controls need attribution information in a format other than HTML source code. We should allow the attribution property to be set to something more structured that can be converted to the appropriate data structures on the client side. For example, it could be an array of objects, each with a required title property (interpreted as literal text) and an optional url property (for linking):
Should other formatting be allowed? The current specification doesn’t disallow any HTML tags, so it’s theoretically possible to boldface text or embed images. While such content may be feasible in Web clients, native clients may have difficulty displaying it.
Perhaps there should be a separate feedback property beside the attribution property. Many TileJSON documents hosted by Mapbox include an “Improve This Map” link alongside copyright statements. Native clients may want to open an alternative map feedback tool (Map feedback view controller mapbox-gl-native#6001); as things stand, they’d have to look for and omit a specific URL. In space-constrained environments, the client may choose to omit feedback items from the attribution UI to ensure that all the legally required copyright statements are visible.
Is it realistic that TileJSON producers will include attribution in lots of different languages?
Maybe not lots, but yes, some developers have requested this functionality in the past. (mapbox/mapbox-gl-js#1485 would be a workaround at the map level.)
As explained in mapbox/mapbox-gl-native#2723 (comment), native map controls need attribution information in a format other than HTML source code. We should allow the
attributionproperty to be set to something more structured that can be converted to the appropriate data structures on the client side. For example, it could be an array of objects, each with a requiredtitleproperty (interpreted as literal text) and an optionalurlproperty (for linking):{ "attribution": [ { "title": "© OpenStreetMap contributors", "url": "http://www.openstreetmap.org/about/" }, { "title": "Creative Commons Attribution-ShareAlike 2.0", "url": "http://www.openstreetmap.org/copyright/" } ] }Other considerations:
titleproperty be localizable? If so, perhaps it should be set to an object mapping ISO 639 language codes to literal strings.short_titleproperty beside thetitleproperty.feedbackproperty beside theattributionproperty. Many TileJSON documents hosted by Mapbox include an “Improve This Map” link alongside copyright statements. Native clients may want to open an alternative map feedback tool (Map feedback view controller mapbox-gl-native#6001); as things stand, they’d have to look for and omit a specific URL. In space-constrained environments, the client may choose to omit feedback items from the attribution UI to ensure that all the legally required copyright statements are visible./cc @kkaefer @jfirebaugh