Skip to content

Commit

Permalink
Add props for maxZoom and minZoom
Browse files Browse the repository at this point in the history
  • Loading branch information
jlpereira committed Aug 8, 2023
1 parent 3f672c8 commit ea79069
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/assets/css/vars.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
--color-base-content: 0, 0, 0;

--color-map-georeference: 239, 68, 68;
--color-map-aggregate: 249, 115, 22;
--color-map-aggregate: 3, 115, 22;
--color-map-asserted: 249, 115, 22;
--color-map-type-material: 51, 136, 255;
--color-map-collection-object: 239, 68, 68;
Expand Down
13 changes: 12 additions & 1 deletion src/components/Map/VMap.client.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@ const props = defineProps({
default: 18
},
maxZoom: {
type: Number,
default: 18
},
minZoom: {
type: Number,
default: 0
},
disableZoom: {
type: Boolean,
default: false
Expand Down Expand Up @@ -102,7 +112,8 @@ let geoJSONGroup
const leafletMap = ref(null)
const tiles = {
osm: L.tileLayer(map_tile_server, {
maxZoom: 18,
maxZoom: props.maxZoom,
minZoom: props.minZoom,
className: 'map-tiles',
attribution: map_tile_attribution
})
Expand Down

0 comments on commit ea79069

Please sign in to comment.