Skip to content

Commit

Permalink
Reorder fields in doc and config
Browse files Browse the repository at this point in the history
  • Loading branch information
saesh committed Mar 17, 2022
1 parent cea8c19 commit ae4d98d
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 28 deletions.
48 changes: 23 additions & 25 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -348,31 +348,6 @@ the configured tileserver supports.
- Type: [`Number`]
- Default: `19`

### `map.maxZoom`

Allow zooming closer than the tile server supports, which will result in (slightly)
blurry tiles on higher zoom levels. Set to the same value as [`map.maxNativeZoom`](#map.maxNativeZoom)
to disable.

- Type: [`Number`]
- Default: `21`

### `map.zoomOffset`

Offset the zoom level to account for different tile sizes. For example tiles with a
size of 512x512 need an offset of -1 and for 1024x1024 an offset of -2.

- Type: [`Number`]
- Default: `0`

### `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.maxPointDistance`

Maximum distance (in meters) between points for them to be part of the the same line.
Expand All @@ -392,7 +367,14 @@ splitting into separate lines.
};
```

### `map.maxZoom`

Allow zooming closer than the tile server supports, which will result in (slightly)
blurry tiles on higher zoom levels. Set to the same value as [`map.maxNativeZoom`](#map.maxNativeZoom)
to disable.

- Type: [`Number`]
- Default: `21`

### `map.polyline`

Expand All @@ -409,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)
Expand All @@ -426,6 +416,14 @@ and [this Wikipedia article](https://en.wikipedia.org/wiki/Tiled_web_map).
};
```

### `map.zoomOffset`

Offset the zoom level to account for different tile sizes. For example tiles with a
size of 512x512 need an offset of -1 and for 1024x1024 an offset of -2.

- Type: [`Number`]
- Default: `0`

### `onLocationChange.fitView`

Whether to re-fit the map's content into view or not when a location update is received.
Expand Down
4 changes: 2 additions & 2 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ const DEFAULT_CONFIG = {
maxNativeZoom: 19,
maxPointDistance: null,
maxZoom: 21,
zoomOffset: 0,
tileSize: 256,
polyline: {
color: null,
fillColor: "transparent",
},
tileSize: 256,
url: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
zoomOffset: 0,
},
onLocationChange: {
fitView: false,
Expand Down
2 changes: 1 addition & 1 deletion src/views/Map.vue
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,10 @@ export default {
markerIcon: LCustomMarker,
maxZoom: this.$config.map.maxZoom,
maxNativeZoom: this.$config.map.maxNativeZoom,
zoomOffset: this.$config.map.zoomOffset,
tileSize: this.$config.map.tileSize,
url: this.$config.map.url,
zoom: this.$store.state.map.zoom,
zoomOffset: this.$config.map.zoomOffset,
circle: {
...this.$config.map.circle,
color: this.$config.map.circle.color || this.$config.primaryColor,
Expand Down

0 comments on commit ae4d98d

Please sign in to comment.