Select to view content in your preferred language

Toggle on off FeatureLayer visibility

2027
3
Jump to solution
04-29-2014 11:29 PM
ArowanaIndah
Deactivated User
Hi,

I'm trying to do on off button Feature Layer using sample from https://developers.arcgis.com/javascript/jssamples/widget_infowindow.html. There is sample from https://developers.arcgis.com/javascript/jssamples/map_explicitlayerlist.html but i don't know how to use it in my sample. Could someone help me how to configure or where to insert the script in my sample so that i can toggling my sample layer visibility.

Thank
0 Kudos
1 Solution

Accepted Solutions
JakeSkinner
Esri Esteemed Contributor
Here is the update to the JSFiddle.

View solution in original post

0 Kudos
3 Replies
JakeSkinner
Esri Esteemed Contributor
Hi Arowana,

Here is an example of using a Toggle button to turn on/off a feature layer:

http://jsfiddle.net/YNA9A/
0 Kudos
ArowanaIndah
Deactivated User
Hi Arowana,

Here is an example of using a Toggle button to turn on/off a feature layer:

http://jsfiddle.net/YNA9A/


Thank for the link and it's great. Sorry for asking again. I'm not really good in arcgis javascript. How do i make when user open the application it only show a base map not the feature layer. Feature layer only appear when user click toggle button.

Thank
0 Kudos
JakeSkinner
Esri Esteemed Contributor
Here is the update to the JSFiddle.
0 Kudos