ReadonlyapiOptional ReadonlycollapsedAs default the LayerControl is expanded. But by adding the collapsed option, it is possible to force the LayerControl as collapsed instead:
<LayerControl :api="api" :collapsed="true"/>
Optional ReadonlycurrentIf you are using the OpenLayers like descibed above, you can add a reactive property with the current resolution to the component. Then the component will indicate if the dataset is visible in the current zoom level:
const currentResolution = ref<number>()
map.on('moveend', () => currentResolution.value = map.getView().getResolution())
<LayerControl :api="api" :currentResolution="currentResolution"/>
Optional ReadonlydisableTo remove the "Add layers" button from the LayerControl, just add disableDatasetStore like this:
<LayerControl :api="api" :disableDatasetStore="true"/>
This will remove the buttom as well as the "Show metadata" button and the "Remove layer" button from each dataset in the LayerControl.
Get the expanded state
Optional ReadonlyhiddenIn some cases, like when using the LayerToggle compoment, you would like to hide some specific datasets in the LayerControl and in the DatasetStore. You can do this using the hiddenDatasets options like this:
const layerToggleLayers = ['urn:dmp:ds:skaermkort-daempet', 'urn:dmp:ds:ortofoto-foraar-nyeste-tilgaengelige']
<LayerControl :api="api" :hiddenDatasets="layerToggleLayers"/>
Hide the dataset store
Hide the DatasetStore
Set the expanded state
Show the dataset store
Show the DatasetStore
Show the metadata detail page for a specific Dataset and more
Show the metadata detail page for a specific Dataset and more
Optional ReadonlyshowOn the ClientAPI, there is a helper function for downloading datasets as a QGIS project. It is possible to add a "Download QGIS project" button to the settings menu in the LayerControl. Just add showQGISButton as an option like this:
<LayerControl :api="api" :showQGISButton="true"/>
When the user presses the button, the datasets that are visible in the LayerControl, will be included in the QGOS projekt.
The API instance that should control the state of the LayerControl