|
14 | 14 | @map:zoomend="isZooming = false" |
15 | 15 | > |
16 | 16 | <mgl-draw-control |
| 17 | + v-if="useDrawPlugin" |
17 | 18 | position="top-left" |
18 | 19 | v-model:mode="drawMode" |
19 | 20 | :model="drawModel" |
20 | | - zoom-on-update |
| 21 | + auto-zoom |
21 | 22 | :min-area-size="800000000" |
22 | 23 | min-area-label="TOO SMALL" |
23 | 24 | @update:model="onDrawModelUpdate" |
|
44 | 45 | /> |
45 | 46 | </mgl-geo-json-source> |
46 | 47 |
|
47 | | -<!-- Test source not working anymore: CORS ERRORS --> |
48 | | -<!-- <mgl-vector-source source-id="libraries" :tiles="librariesSourceTiles">--> |
49 | | -<!-- <mgl-circle-layer layer-id="libraries" source-layer="libraries" :paint="librariesLayerCirclesPaint"--> |
50 | | -<!-- :filter="librariesLayerCirclesFilter"/>--> |
51 | | -<!-- </mgl-vector-source>--> |
| 48 | + <!-- Test source not working anymore: CORS ERRORS --> |
| 49 | + <!-- <mgl-vector-source source-id="libraries" :tiles="librariesSourceTiles">--> |
| 50 | + <!-- <mgl-circle-layer layer-id="libraries" source-layer="libraries" :paint="librariesLayerCirclesPaint"--> |
| 51 | + <!-- :filter="librariesLayerCirclesFilter"/>--> |
| 52 | + <!-- </mgl-vector-source>--> |
52 | 53 |
|
53 | 54 | </mgl-map> |
54 | 55 | </div> |
|
70 | 71 | <br/> |
71 | 72 | <span>Attribution Position: {{ controlPosition }}</span> |
72 | 73 | </div> |
| 74 | + <div> |
| 75 | + <input type="checkbox" v-model="useDrawPlugin" id="use-draw"> |
| 76 | + <label for="use-draw">Use Draw Plugin</label> |
| 77 | + </div> |
73 | 78 | <div> |
74 | 79 | <input type="checkbox" v-model="useClasses" id="noclasses"> |
75 | 80 | <label for="noclasses">Use Custom Control Classes</label> |
|
163 | 168 | const map = useMap(), |
164 | 169 | mapVersion = ref<string>(), |
165 | 170 | showCustomControl = ref(true), |
| 171 | + useDrawPlugin = ref(true), |
166 | 172 | loaded = ref(0), |
167 | 173 | markerCoordinates = ref<LngLatLike>([ 13.377507, 52.516267 ]), |
168 | 174 | bounds = ref<LngLatBoundsLike>(), |
|
265 | 271 | // setTimeout(() => drawModel.value = drawCircleExample2, 5000); |
266 | 272 |
|
267 | 273 | return { |
268 | | - showCustomControl, loaded, map, mapVersion, markerCoordinates, geojsonSource, bounds, onLoad, onMouseenter, setLanguage, |
| 274 | + showCustomControl, useDrawPlugin, loaded, map, mapVersion, markerCoordinates, geojsonSource, bounds, onLoad, onMouseenter, setLanguage, |
269 | 275 | geojsonSourceData : geojsonSource.data, |
270 | 276 | isZooming : ref(false), |
271 | 277 | controlPosition : ref(Position.TOP_LEFT), |
|
0 commit comments