Skip to content

Commit

Permalink
fix(draw): do not use draw in v3
Browse files Browse the repository at this point in the history
  • Loading branch information
tkohr committed Dec 9, 2024
1 parent 20f3c10 commit 44bedce
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/components/map/map-container.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,8 @@ const { embedded } = storeToRefs(appStore)
const map = useMap()
const mapContainer = ref(null)
const olMap = map.createMap()
// add draw layer after map init to allow restoring draw features
const draw = useDraw()
draw.addDrawLayer(olMap)
withDefaults(
const props = withDefaults(
defineProps<{
v4_standalone?: boolean
}>(),
Expand All @@ -34,6 +31,13 @@ withDefaults(
}
)
// add draw layer after map init to allow restoring draw features (not in v3 for now)
// TODO: remove v4_standalone condition once v4 draw is used in v3
if (props.v4_standalone) {
const draw = useDraw()
draw.addDrawLayer(olMap)
}
const DEFAULT_EXTENT = [
425152.9429259216, 6324465.99999133, 914349.9239510496, 6507914.867875754,
] // TODO: comming from legacy var "defaultExtent", to be moved to config
Expand Down

0 comments on commit 44bedce

Please sign in to comment.