From 45b80fc096549c1ba5279d104f1c977723865124 Mon Sep 17 00:00:00 2001 From: Mustafa Taha Şahin Date: Wed, 31 Mar 2021 01:41:22 +0300 Subject: Added tileSize attribute for OSM map style --- modern/src/map/mapStyles.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modern') diff --git a/modern/src/map/mapStyles.js b/modern/src/map/mapStyles.js index ff323cb3..5a4ee10a 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', '© OpenStreetMap contributors', + 256, ); export const styleCarto = () => ({ -- cgit v1.2.3