Skip to content

Show the map's credit where it can be seen - #72

Merged
octopranav merged 1 commit into
mainfrom
map-credit
Sep 25, 2026
Merged

octopranav merged 1 commit into
mainfrom
map-credit

Conversation

@octopranav

Copy link
Copy Markdown
Owner

What changes

  • The problem. MapLibre draws its credit button and logo in the map's bottom corner. In the app that corner is under the sheet, so the map carried no visible credit.
  • What is owed. OpenStreetMap's attribution guidelines ask for credit in a corner of the map, with the copyright page reachable. OpenFreeMap asks for "OpenFreeMap © OpenMapTiles Data from OpenStreetMap", with its three links.
  • The fix. The library's credit and logo are turned off. PlaceMap now 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).
  • Where the words come from. Credit.kt reads 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 new CreditTest cases.
    • a source's credit is shown
    • a credit two sources share is shown once
    • with no source declared, the provider's line stands in
    • the stand-in links OpenStreetMap to its copyright page
  • Emulator:
    • Light and dark: the line sits in the bottom-left corner above the sheet, on one line, left of the buttons.
    • Tapping "OpenStreetMap" sent a VIEW intent for https://www.openstreetmap.org/… to Chrome.
    • Temporary build with the stand-in replaced by a marker: the line shown was still OpenFreeMap's, so it is read from the tiles. The build was reverted.

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.
@octopranav
octopranav merged commit 2ac0c7a into main Sep 25, 2026
21 checks passed
@octopranav
octopranav deleted the map-credit branch September 25, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant