@@ -30,48 +30,46 @@ function shouldAggregateSubLayerBeVisible(subLayer) {
3030 </script >
3131
3232<template >
33- <div >
34- <MaplibreWMTSLayer
35- v-if =" layerConfig.type === LayerTypes.WMTS"
36- :wmts-layer-config =" layerConfig"
37- />
38- <MaplibreWMSLayer
39- v-if =" layerConfig.type === LayerTypes.WMS"
40- :wms-layer-config =" layerConfig"
41- />
42- <MaplibreGeoJSONLayer
43- v-if =" layerConfig.type === LayerTypes.GEOJSON"
44- :layer-id =" layerConfig.id"
45- :data-url =" layerConfig.geoJsonUrl"
46- :style-url =" layerConfig.styleUrl"
47- :z-index =" zIndex"
48- /><!--
49- Aggregate layers are some kind of a edge case where two or more layers are joint together but only one of them
50- is visible depending on the map resolution.
51- We have to manage aggregate layers straight here otherwise we won't be able to make a recursive call to this
52- component in another child (that would be OpenLayersAggregateLayer.vue component, that doesn't work).
53- See https://vuejs.org/v2/guide/components-edge-cases.html#Recursive-Components for more info
54- -->
55- <div v-if =" layerConfig.type === LayerTypes.AGGREGATE" >
56- <!-- we can't v-for and v-if at the same time, so we need to wrap all sub-layers in a <div> -->
57- <div
58- v-for =" aggregateSubLayer in layerConfig.subLayers"
59- :key =" aggregateSubLayer.subLayerId"
60- >
61- <maplibre-internal-layer
62- v-if =" shouldAggregateSubLayerBeVisible(aggregateSubLayer)"
63- :layer-config =" aggregateSubLayer.layer"
64- :z-index =" zIndex"
65- />
66- </div >
33+ <MaplibreWMTSLayer
34+ v-if =" layerConfig.type === LayerTypes.WMTS"
35+ :wmts-layer-config =" layerConfig"
36+ />
37+ <MaplibreWMSLayer
38+ v-if =" layerConfig.type === LayerTypes.WMS"
39+ :wms-layer-config =" layerConfig"
40+ />
41+ <MaplibreGeoJSONLayer
42+ v-if =" layerConfig.type === LayerTypes.GEOJSON"
43+ :layer-id =" layerConfig.id"
44+ :data-url =" layerConfig.geoJsonUrl"
45+ :style-url =" layerConfig.styleUrl"
46+ :z-index =" zIndex"
47+ /><!--
48+ Aggregate layers are some kind of a edge case where two or more layers are joint together but only one of them
49+ is visible depending on the map resolution.
50+ We have to manage aggregate layers straight here otherwise we won't be able to make a recursive call to this
51+ component in another child (that would be OpenLayersAggregateLayer.vue component, that doesn't work).
52+ See https://vuejs.org/v2/guide/components-edge-cases.html#Recursive-Components for more info
53+ -->
54+ <div v-if =" layerConfig.type === LayerTypes.AGGREGATE" >
55+ <!-- we can't v-for and v-if at the same time, so we need to wrap all sub-layers in a <div> -->
56+ <div
57+ v-for =" aggregateSubLayer in layerConfig.subLayers"
58+ :key =" aggregateSubLayer.subLayerId"
59+ >
60+ <maplibre-internal-layer
61+ v-if =" shouldAggregateSubLayerBeVisible(aggregateSubLayer)"
62+ :layer-config =" aggregateSubLayer.layer"
63+ :z-index =" zIndex"
64+ />
6765 </div >
68- <!-- <OpenLayersKMLLayer-->
69- <!-- v-if="layerConfig.type === LayerTypes.KML"-->
70- <!-- :layer-id="layerConfig.id"-->
71- <!-- :opacity="layerConfig.opacity"-->
72- <!-- :url="layerConfig.getURL()"-->
73- <!-- :z-index="zIndex"-->
74- <!-- />-->
75- <slot />
7666 </div >
67+ <!-- <OpenLayersKMLLayer-->
68+ <!-- v-if="layerConfig.type === LayerTypes.KML"-->
69+ <!-- :layer-id="layerConfig.id"-->
70+ <!-- :opacity="layerConfig.opacity"-->
71+ <!-- :url="layerConfig.getURL()"-->
72+ <!-- :z-index="zIndex"-->
73+ <!-- />-->
74+ <slot />
7775</template >
0 commit comments