Skip to content

Commit

Permalink
Add config indoorMinZoom.
Browse files Browse the repository at this point in the history
  • Loading branch information
francois2metz committed Feb 19, 2022
1 parent ab054c1 commit d39a009
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ A few configuration options are available by editing the `config.json` file:
- `mapTilerApiKey`: the [MapTiler](https://www.maptiler.com/) API Key
- `tilesUrl`: The URL of the indoor= tileJSON
- `indoorEqualApiKey`: the [indoor=](https://indoorequal.com/) API Key (optional if you don't use the official indoor= tileJSON
- `indoorMinZoom`: The minimum level of zoom when the indoor features are displayed

## Remote Command API

Expand Down
3 changes: 2 additions & 1 deletion config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"mapTilerApiKey": "T7HQrA4a6k5eOxDGD6qp",
"indoorEqualApiKey": "iek_ScxQpnty0VWJIvBqa3S6su4XGIiQ",
"tilesUrl": "https://tiles.indoorequal.org/"
"tilesUrl": "https://tiles.indoorequal.org/",
"indoorMinZoom": 16
}
8 changes: 4 additions & 4 deletions js/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
/>
</indoor-map>
<v-chip
v-if="!preview && mapZoom < 17"
v-if="!preview && mapZoom < indoorMinZoom"
color="primary"
class="zoom-chip"
@click="mapZoom = 17"
Expand All @@ -47,7 +47,7 @@
:map-center="mapCenter"
:map-level="mapLevel"
:map-zoom="mapZoom"
:min-zoom="minZoom"
:indoor-min-zoom="indoorMinZoom"
@updateBounds="updateBounds"
/>
<indoor-preview-toolbar
Expand Down Expand Up @@ -83,7 +83,7 @@

<script>
import { MglMarker } from 'vue-mapbox/dist/vue-mapbox.umd';
import { tilesUrl, indoorEqualApiKey } from '../config.json';
import { tilesUrl, indoorEqualApiKey, indoorMinZoom } from '../config.json';
import IndoorDiscover from './discover';
import IndoorMap from './map';
import IndoorPoi from './poi';
Expand Down Expand Up @@ -135,7 +135,7 @@ export default {
poi: '',
poiCoordinates: [],
menu: null,
minZoom: 17,
indoorMinZoom: indoorMinZoom,
newMapBounds: [],
newMapCenter: {},
sprite: null,
Expand Down
4 changes: 2 additions & 2 deletions js/toolbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export default {
required: true
},
minZoom: {
indoorMinZoom: {
type: Number,
required: true
},
Expand All @@ -109,7 +109,7 @@ export default {
computed: {
editDisabled() {
return this.mapZoom < this.minZoom;
return this.mapZoom < this.indoorMinZoom;
},
JOSMParams() {
Expand Down

0 comments on commit d39a009

Please sign in to comment.