Skip to content

Fix for OS Maps bug #1353 - #1354

Closed
MrNoScript wants to merge 1 commit into
traccar:masterfrom
stravalution:fix-os-maps-bug
Closed

MrNoScript wants to merge 1 commit into
traccar:masterfrom
stravalution:fix-os-maps-bug

Conversation

@MrNoScript

@MrNoScript MrNoScript commented Apr 4, 2025 •

Copy link
Copy Markdown
Contributor

Fix problem with font stack "Open Source Sans" not being found on the OS API endpoints - force the use of "Source Sans Pro Regular"

id: 'ordnanceSurvey',
title: t('mapOrdnanceSurvey'),
style: 'https://api.os.uk/maps/vector/v1/vts/resources/styles?key=EAZ8p83u72FTGiLjLC2MsTAl1ko6XQHC',
style: `https://api.os.uk/maps/vector/v1/vts/resources/styles?key=${ordnanceSurveyKey}`,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reason for using own key?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That key appears to have been revoked by the person who originally put it in, and so the "tiles" don't load with the error "A Premium Plan is required to access Premium Data"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I never revoked it. I though maps are free and don't require any "access Premium Data".

@MrNoScript MrNoScript Apr 4, 2025 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At zoom level 12 and above, the tiles are considered "premium", 11 and below are free - apologies.

Would the option to use our own token be more sensible? Similar to the LocationIQ service?

E.g.

const ordnanceSurveyKey = useAttributePreference('ordnanceSurveyKey') || 'YOUR TOKEN HERE';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think that works.

tananaev added a commit that referenced this pull request Jun 23, 2026
Replace the hardcoded Ordnance Survey API key with a user-configurable
ordnanceSurveyKey preference, gate availability on the key being set, and
force the "Source Sans Pro Regular" font for api.os.uk glyphs so OS maps
render correctly.

Supersedes #1354 (original branch is on a now-private fork that can no
longer be updated). Closes #1353.

Co-Authored-By: MrNoScript <17362326+MrNoScript@users.noreply.github.com>
tananaev added a commit that referenced this pull request Jun 23, 2026
* Fix Ordnance Survey map and make API key configurable

Replace the hardcoded Ordnance Survey API key with a user-configurable
ordnanceSurveyKey preference, gate availability on the key being set, and
force the "Source Sans Pro Regular" font for api.os.uk glyphs so OS maps
render correctly.

Supersedes #1354 (original branch is on a now-private fork that can no
longer be updated). Closes #1353.

Co-Authored-By: MrNoScript <17362326+MrNoScript@users.noreply.github.com>

* Fall back to shared Ordnance Survey key and tidy ordering

Keep the shared Ordnance Survey key as a fallback when the user has not
set their own ordnanceSurveyKey, matching the locationIqKey pattern
(always available, no attribute redirect). Move the mapOrdnanceSurveyKey
label next to mapOrdnanceSurvey.

---------

Co-authored-by: MrNoScript <17362326+MrNoScript@users.noreply.github.com>
@tananaev

Copy link
Copy Markdown
Member

Fixed and merged under #1862.

@tananaev tananaev closed this Jun 23, 2026
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.

2 participants