Can someone provide an example for toggling FeatureLayers on/off?
I would also like to ave the option of switching between my basemaps that are LocalTiledLayers, is this possible?
I thought I saw an example but I cannot find it now.
Thanks,
PW
The Simple Renderer Online sample was the one I was looking for.
Add a check box for each layer:
CheckBox {
id: topoCheckBox
text: qsTr("Topo")
checked: true
onCheckedChanged: {
updateVisibility(topo, checked);
}
Include the function:
function updateVisibility(layerId, visible) {
layerId.visible = visible;
Seems to work fine with ArcGISTiledMapServiceLayer, ArcGISLocalTiledLayer, and FeatureLayer
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.