Select to view content in your preferred language

Get Web Map Layer by title removed in 2.4.0, bring it back!!

682
5
10-08-2024 07:50 AM
Status: Open
Labels (2)
Clubdebambos
MVP Regular Contributor

In the API version 2.3.X and lower there was a lovely WebMap object method called get_layer() that allowed you to retrieve the layer definition using a title parameter and supplying in the name of the layer as a string. See the docs here.

With 2.4.0 this neat functionality has been removed. We now access the layer via m.content.layers[index_position], which means I need to know the index of the layer in the first place. I now have to write a custom method to get the layer of interest based on the title!

Please reinstate this functionality and bring back a way for us to get the WebMap (Map) layer by the layer title!

5 Comments
NanaeAubry

Thanks for posting this. When making such a big shift it's difficult to gauge the importance of certain methods and properties that were previously available.

Since a lot of methods now rely on layer index we will make a method that allows you to get the layer and the index of said layer more easily.

Geraldine

Yes please, bring this back!

jkarmon

I second this! Any word on when this will be resurrected?

BBarbs
by

I'd also like to add my voice to bring this feature back!

RichardHowe

Why would you remove this? Please bring it back