diff --git a/docs/config.md b/docs/config.md index 6b7bc3b..9f291ae 100644 --- a/docs/config.md +++ b/docs/config.md @@ -391,6 +391,14 @@ for all possible values. } ``` +### `map.tileSize` + +Size of the tiles in pixels returned by the tile server. Can be used together with +[`map.zoomOffset`](#map.zoomOffset) to configure bigger tile sizes. + +- Type: [`Number`] +- Default: `256` + ### `map.url` Tile server URL. For more information see [Leaflet tile layer documentation](https://leafletjs.com/reference-1.5.0.html#tilelayer-url-template) diff --git a/src/config.js b/src/config.js index c83319c..74684ee 100644 --- a/src/config.js +++ b/src/config.js @@ -64,6 +64,7 @@ const DEFAULT_CONFIG = { color: null, fillColor: "transparent", }, + tileSize: 256, url: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", zoomOffset: 0, }, diff --git a/src/index.d.ts b/src/index.d.ts index 081d614..e228a99 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -55,6 +55,7 @@ interface Config { color: OptionalColor; fillColor: OptionalColor; }; + tileSize: number; url: string; zoomOffset: number; }; diff --git a/src/views/Map.vue b/src/views/Map.vue index 977f6bb..9106c78 100644 --- a/src/views/Map.vue +++ b/src/views/Map.vue @@ -21,6 +21,7 @@ @@ -154,6 +155,7 @@ export default { markerIcon: LCustomMarker, maxZoom: this.$config.map.maxZoom, maxNativeZoom: this.$config.map.maxNativeZoom, + tileSize: this.$config.map.tileSize, url: this.$config.map.url, zoom: this.$store.state.map.zoom, zoomOffset: this.$config.map.zoomOffset,