Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

Getting all map layers #37

Open
deepal13 opened this issue Sep 13, 2016 · 6 comments
Open

Getting all map layers #37

deepal13 opened this issue Sep 13, 2016 · 6 comments

Comments

@deepal13
Copy link

@tmcgee I am trying to get all the layers using map.layerIds.length and then iterating through them. It gives me all the layers except from the ones added through DnD widget. How can I get those layers?

Also, The layers added through DnD doesn't move up or down with respect to already added operational layer. Can you please help me?

Thanks

@tmcgee
Copy link
Contributor

tmcgee commented Sep 13, 2016

@deepal13 These are graphic layers so you have to use map.graphicsLayerIds

@deepal13
Copy link
Author

@tmcgee That worked fine. Thanks :)
The layers added through DnD doesn't move up or down with respect to already added operational layer. Is it supposed to be this way?

@tmcgee
Copy link
Contributor

tmcgee commented Sep 20, 2016

@deepal13 In the Esri JavaScript API, graphic layers are always drawn on top so they cannot be moved below other non-graphic layers.

@deepal13
Copy link
Author

@tmcgee Ok. But I am unable to move San Francisco 311 Incidents below louisvillePubSafety in the demo example.

@tmcgee
Copy link
Contributor

tmcgee commented Sep 26, 2016

@deepal13 yes, that is how it works. The San Francisco 311 layer is a feature layer (graphic) and the Louisville Public Safety layer is a dynamic layer (non-graphic)

@deepal13
Copy link
Author

@tmcgee Ok. I got it. Thanks for your help.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants