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

Structured attribution #20

Open
1ec5 opened this issue Aug 13, 2016 · 4 comments
Open

Structured attribution #20

1ec5 opened this issue Aug 13, 2016 · 4 comments
Labels

Comments

@1ec5
Copy link

1ec5 commented Aug 13, 2016

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):

{
  "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:

  • Should the title property be localizable? If so, perhaps it should be set to an object mapping ISO 639 language codes to literal strings.
  • Mobile clients are often space-constrained. In the example above, it may be advantageous to abbreviate the two items as “© OSM” and “CC BY-SA”. These abbreviations could go in a short_title property beside the title property.
  • 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.

/cc @kkaefer @jfirebaugh

@kkaefer
Copy link
Contributor

kkaefer commented Aug 15, 2016

Should the title property be localizable? If so, perhaps it should be set to an object mapping ISO 639 language codes to literal strings.

Is it realistic that TileJSON producers will include attribution in lots of different languages?

Perhaps there should be a separate feedback property beside the attribution property.

👍

@1ec5
Copy link
Author

1ec5 commented Aug 16, 2016

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.)

@reyemtm
Copy link

reyemtm commented Nov 2, 2016

This seems like a perfectly reasonable approach. What's the status of this?

@GretaCB
Copy link
Contributor

GretaCB commented Apr 9, 2018

Thanks for opening this ticket @1ec5 . This proposed change will be considered as part of the v4 push #35

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

No branches or pull requests

4 participants