aboutsummaryrefslogtreecommitdiff
path: root/modern/src/map/core
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-08-01 08:10:53 -0700
committerAnton Tananaev <anton@traccar.org>2022-08-01 08:10:53 -0700
commiteeaa67a1fcafb2a95bea450035504726b9481838 (patch)
tree1b6a8710263182ce6696fa6f54284fe1e77771e2 /modern/src/map/core
parent26fd9c7f4a4280e4f906f79fb779fb9c73483adf (diff)
downloadtrackermap-web-eeaa67a1fcafb2a95bea450035504726b9481838.tar.gz
trackermap-web-eeaa67a1fcafb2a95bea450035504726b9481838.tar.bz2
trackermap-web-eeaa67a1fcafb2a95bea450035504726b9481838.zip
Fix ordnance survey map
Diffstat (limited to 'modern/src/map/core')
-rw-r--r--modern/src/map/core/useMapStyles.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/modern/src/map/core/useMapStyles.js b/modern/src/map/core/useMapStyles.js
index 7ab77ae2..ba9ac5a6 100644
--- a/modern/src/map/core/useMapStyles.js
+++ b/modern/src/map/core/useMapStyles.js
@@ -10,8 +10,8 @@ const styleCustom = ({ tiles, minZoom, maxZoom, attribution }) => ({
tiles,
attribution,
tileSize: 256,
- minzoom: minZoom,
- maxzoom: maxZoom,
+ minzoom: minZoom || 0,
+ maxzoom: maxZoom || 20,
},
},
glyphs: 'https://cdn.traccar.com/map/fonts/{fontstack}/{range}.pbf',
@@ -161,6 +161,9 @@ export default () => {
id: 'ordnanceSurvey',
title: t('mapOrdnanceSurvey'),
style: 'https://api.os.uk/maps/vector/v1/vts/resources/styles?key=EAZ8p83u72FTGiLjLC2MsTAl1ko6XQHC',
+ transformRequest: (url) => ({
+ url: `${url}&srs=3857`,
+ }),
available: true,
},
{