-
Notifications
You must be signed in to change notification settings - Fork 232
Extract maptiler's map ids #926
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll need to pass our custom styles in through CI now, too, right? I guess they don't need to be secrets, but they'll still need to be set in ENV vars in the workflows
name = "maptiler_dark_map_id", | ||
value = System.getenv("ELEMENT_ANDROID_MAPTILER_DARK_MAP_ID") | ||
?: readLocalProperty("services.maptiler.darkMapId") | ||
?: "basic-v2" // fall back to maptiler's default map. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
basic-v2-dark?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OH indeed it works but it was not shown in maptiler's dashboard. How did you figure it out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a bit buried: https://www.maptiler.com/maps/dark/ has a "Use Basic Dark" link and the style ID is in the URL. (I think I'd seen it before, otherwise I wouldn't have known to gone hunting there!)
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #926 +/- ##
========================================
Coverage 56.61% 56.61%
========================================
Files 968 968
Lines 24583 24583
Branches 4987 4987
========================================
Hits 13917 13917
Misses 8457 8457
Partials 2209 2209
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just needs env vars adding for the CI builds
Maptiler custom map ids are only useable by the account that create them. So if we hardcode them forkers won't be able to use the maps even if the bring in their own api key (because they can't access our maps with their api key). Requires to set our map ids in `local.properties` for local development: ``` services.maptiler.lightMapId=9bc819c8-e627-474a-a348-ec144fe3d810 services.maptiler.darkMapId=dea61faf-292b-4774-9660-58fcef89a7f3 ```
181c917
to
0ad33ca
Compare
Done! |
0ad33ca
to
0fa3faf
Compare
Kudos, SonarCloud Quality Gate passed! |
@@ -27,6 +27,10 @@ jobs: | |||
- name: Configure gradle | |||
uses: gradle/[email protected] | |||
- name: Create app bundle | |||
env: | |||
ELEMENT_ANDROID_MAPTILER_API_KEY: ${{ secrets.MAPTILER_KEY }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, did I miss one? Nice catch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No it's been added very recently
Maptiler custom map ids are only useable by the account that create them. So if we hardcode them forkers won't be able to use the maps even if the bring in their own api key (because they can't access our maps with their api key).
Requires to set our map ids in
local.properties
for local development: