@rural-environmental-registry/map_component 2.0.4 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +651 -651
- package/package.json +1 -1
- package/src/components/map/LeafletMap.vue +4 -4
- package/src/components/menu/LayerMenu.vue +2 -2
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
<script setup lang="ts">
|
|
9
9
|
import L from 'leaflet'
|
|
10
|
-
import { nextTick, onBeforeUnmount, onMounted,
|
|
10
|
+
import { nextTick, onBeforeUnmount, onMounted, shallowRef } from 'vue'
|
|
11
11
|
import DrawingControlHandler from '../../handlers/drawingControl'
|
|
12
12
|
import MapHandler from '../../handlers/mapHandler'
|
|
13
13
|
import { DEFAULT_MAP_OPTIONS } from '../../handlers/constants'
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
|
|
46
46
|
const props = defineProps<MapProps>()
|
|
47
47
|
|
|
48
|
-
const map =
|
|
49
|
-
const layerControl =
|
|
50
|
-
const drawItemsGroup =
|
|
48
|
+
const map = shallowRef<L.Map>()
|
|
49
|
+
const layerControl = shallowRef<L.Control.Layers>()
|
|
50
|
+
const drawItemsGroup = shallowRef<L.FeatureGroup>()
|
|
51
51
|
|
|
52
52
|
let mapHandlerInstance: MapHandler | null = null
|
|
53
53
|
let mapToolsHandler: MapToolsHandler | null = null
|
|
@@ -318,7 +318,7 @@
|
|
|
318
318
|
initDefaultLayers()
|
|
319
319
|
})
|
|
320
320
|
},
|
|
321
|
-
{ immediate: true
|
|
321
|
+
{ immediate: true }
|
|
322
322
|
)
|
|
323
323
|
|
|
324
324
|
const onChildLayerChange = (layer: LayerData): void => {
|
|
@@ -508,4 +508,4 @@
|
|
|
508
508
|
border-color: var(--mapa-base-white);
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
|
-
</style>
|
|
511
|
+
</style>
|