aboutsummaryrefslogtreecommitdiff
path: root/modern/src
diff options
context:
space:
mode:
authorMustafa Taha Şahin <taha.sahin@metu.edu.tr>2021-03-31 01:41:22 +0300
committerMustafa Taha Şahin <taha.sahin@metu.edu.tr>2021-03-31 01:41:22 +0300
commit45b80fc096549c1ba5279d104f1c977723865124 (patch)
treee3bb7b3f8edf137cfd56867de1bf3e18560a8dda /modern/src
parent323aaaebc3fd62cdcb6ab5580153af8afeac30e4 (diff)
downloadetbsa-traccar-web-45b80fc096549c1ba5279d104f1c977723865124.tar.gz
etbsa-traccar-web-45b80fc096549c1ba5279d104f1c977723865124.tar.bz2
etbsa-traccar-web-45b80fc096549c1ba5279d104f1c977723865124.zip
Added tileSize attribute for OSM map style
Diffstat (limited to 'modern/src')
-rw-r--r--modern/src/map/mapStyles.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/modern/src/map/mapStyles.js b/modern/src/map/mapStyles.js
index ff323cb..5a4ee10 100644
--- a/modern/src/map/mapStyles.js
+++ b/modern/src/map/mapStyles.js
@@ -1,10 +1,11 @@
-export const styleCustom = (url, attribution) => ({
+export const styleCustom = (url, attribution, tileSize) => ({
version: 8,
sources: {
osm: {
type: 'raster',
tiles: [url],
attribution: attribution,
+ tileSize: tileSize,
},
},
glyphs: 'https://cdn.traccar.com/map/fonts/{fontstack}/{range}.pbf',
@@ -18,6 +19,7 @@ export const styleCustom = (url, attribution) => ({
export const styleOsm = () => styleCustom(
'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
'© <a target="_top" rel="noopener" href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
+ 256,
);
export const styleCarto = () => ({