Add LocationIQ as supported map provider (#1293)

- Add LocationIQ access token field to settings and export modals
  - Include LocationIQ Streets style in gallery
  - Support automatic token replacement for LocationIQ URLs
  - Add LocationIQ tileset configuration
  - Include translations for all supported languages

## Launch Checklist
 - [x] Briefly describe the changes in this PR.
 - [x] Write tests for all new functionality.
 - [x] Add an entry to `CHANGELOG.md` under the `## main` section.
This commit is contained in:
Gopi Aravind
2025-08-17 13:36:26 +05:30
committed by GitHub
parent 728de3aed6
commit e2e29d7f5e
16 changed files with 69 additions and 1 deletions

View File

@@ -46,6 +46,7 @@ function setFetchAccessToken(url: string, mapStyle: StyleSpecification) {
const matchesTilehosting = url.match(/\.tilehosting\.com/);
const matchesMaptiler = url.match(/\.maptiler\.com/);
const matchesThunderforest = url.match(/\.thunderforest\.com/);
const matchesLocationIQ = url.match(/\.locationiq\.com/);
if (matchesTilehosting || matchesMaptiler) {
const accessToken = style.getAccessToken("openmaptiles", mapStyle, {allowFallback: true})
if (accessToken) {
@@ -58,6 +59,12 @@ function setFetchAccessToken(url: string, mapStyle: StyleSpecification) {
return url.replace('{key}', accessToken)
}
}
else if (matchesLocationIQ) {
const accessToken = style.getAccessToken("locationiq", mapStyle, {allowFallback: true})
if (accessToken) {
return url.replace('{key}', accessToken)
}
}
else {
return url;
}