Skip to content

GroupLayer object update_layer() method does not work on the inner group layers but on the Main Map layers! #2277

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Clubdebambos opened this issue May 4, 2025 · 1 comment
Labels

Comments

@Clubdebambos
Copy link

Describe the bug
GroupLayer object update_layer() method does not work on the inner group layers but on the Main Map layers.

To Reproduce
Steps to reproduce the behavior:

from arcgis.gis import GIS
from arcgis.map import Map

## NOTES: GroupLayer is at index 1.

agol = GIS("home")

wm_item = agol.content.get("WM_ITEM_ID")

webmap = Map(wm_item)

gl = webmap.content.layers[1]

# Rename Layer in GroupLayer (well, attemp to anyway)
gl.update_layer(
    index = 0,
    options = {"title" : "Special Protected Areas (SPA)"}
)

gl.update_layer(
    index = 1,
    options = {"title" : "Special Areas of Conservation (SAC)"}
)

webmap.update()

error:

<copy the full error message here>

Screenshots

Image

Expected behavior
The two layers inside the group layer should be updated, not the main map layers.

Platform (please complete the following information):

  • OS: Windows 11 Home
  • Browser Charome
  • Python API Version 2.4.0

Additional context
Add any other context about the problem here, attachments etc.

@nanaeaubry
Copy link
Contributor

@Clubdebambos Thanks for reporting this, we will fix it for the next release. We don't have any workaround as of now

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

No branches or pull requests

2 participants