diff options
author | Mustafa Taha Şahin <taha.sahin@metu.edu.tr> | 2021-03-31 01:41:22 +0300 |
---|---|---|
committer | Mustafa Taha Şahin <taha.sahin@metu.edu.tr> | 2021-03-31 01:41:22 +0300 |
commit | 45b80fc096549c1ba5279d104f1c977723865124 (patch) | |
tree | e3bb7b3f8edf137cfd56867de1bf3e18560a8dda /modern/src | |
parent | 323aaaebc3fd62cdcb6ab5580153af8afeac30e4 (diff) | |
download | etbsa-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.js | 4 |
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 = () => ({ |