Open StefanBrand opened 2 weeks ago
eox-drawtools
@eox/map@1.17.0 @eox/drawtools@0.12.0
CodeSandBox: https://codesandbox.io/p/devbox/2hlkx8
<script setup lang="ts"> import "@eox/map"; import "@eox/drawtools"; import { ref, onMounted } from "vue"; let drawtools = ref({}); const layers = ref(); onMounted(async () => { layers.value = [ { type: "Vector", source: { type: "Vector", url: "https://openlayers.org/data/vector/ecoregions.json", format: "GeoJSON", }, interactions: [ { type: "select", options: { id: "selectInteraction", condition: "pointermove", style: { "stroke-color": "red", "stroke-width": 3 }, }, }, ], }, ]; console.log(document.querySelector("eox-map")); console.log(layers.value); document.querySelector("eox-map").layers = layers.value || []; }); </script> <template> <div> <eox-map .center="[15,48]" .zoom="4" id="tooltipTest" style="width: 300px; height: 300px" > <eox-map-tooltip></eox-map-tooltip> </eox-map> <eox-drawtools id="drawtools" .allowModify="true" .multipleFeatures="true" .showList="true" .type='"Polygon"' .onDrawupdate="() => {console.log(data.value)}" for="eox-map" > </eox-drawtools> </div> </template> <style scoped></style>
Steps to reproduce
eox-drawtools
to a mapVersions
Example
CodeSandBox: https://codesandbox.io/p/devbox/2hlkx8