Jump to content
We've recently updated our Privacy Statement, available here. ×

How to use code to turn on a feature layer when a specific marker layer has been selected

Lauren Fuller

Recommended Posts

Hi all,

I am trying to set up some IronPython code that adds and turns on a feature layer only when a specific marker layer has been selected by the user. My code is below. Error tracebacksays that the file for the new feature layer has not been found. I have checked the file name and it is correct,so I must have something else wrong in the code. Any help will be much appreciated!

Thank you!



## set visualiation as map chart

map = visualization.As[MapChart]()

## add new feature layer


## give new layer a title


## if the title of the markerlayer the user hasselected is "FB" then turn on the new feature layer "RR43" also

if (layer.Title == "FB"):


Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...