Show the map's credit where it can be seen - #72
Merged
Merged
Conversation
Every basemap is OpenStreetMap data. Its licence asks for credit in a corner of the map with a way to its copyright page, and the tile provider asks for its own line beside it. The map library draws its credit button and logo in the bottom corner, under the sheet, so the app showed no credit anyone could see. The library's own credit and logo are now off, and the map draws the line its sources declare in the bottom corner the sheet leaves, clear of the buttons, each name a link, in full as the website shows it. Until a source has declared its line, the tile provider's own words stand in; with the stand-in replaced by a marker, the line on the emulator was still the provider's, read from its tiles.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
PlaceMapnow draws the credit its sources declare in the bottom-left corner of the uncovered map, above the sheet and clear of the button column (creditEnd). It sits on a plate of the surface colour so it reads over any basemap, each name is a link, and it is shown in full, as the site's maps show theirs (compact: false).Credit.ktreads them from the style's sources (Source.getAttribution(), which the tiles' TileJSON supplies), shown once each. Until a source has declared a line, OpenFreeMap's own line stands in, word for word.Checks
:map:testDebugUnitTest: four newCreditTestcases.https://www.openstreetmap.org/…to Chrome.