-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
swap_view does not work Hosted Feature Services with multiple layers #2029
Labels
Comments
You are passing in a URL, it takes Table or FeatureLayer |
I've tried both ways.....it still provides the same error. It is because when you specify a layer index, then at some point the view would have layers from multiple services. |
I also am having this problem. Has there been any headway towards a suggested solution? |
Can you post your code? |
Done. Thanks for looking.
Bob Holliday, GIS Analyst
***@***.*** ***@***.******@***.***>
***@***.*** 406.444.0770
***@***.*** msl.mt.gov<http://www.msl.mt.gov/>
***@***.***<http://www.msl.mt.gov/>
_________________________
From: Andrew ***@***.***>
Sent: Wednesday, November 27, 2024 10:15 AM
To: Esri/arcgis-python-api ***@***.***>
Cc: Holliday, Robert ***@***.***>; Comment ***@***.***>
Subject: [EXTERNAL] Re: [Esri/arcgis-python-api] swap_view does not work Hosted Feature Services with multiple layers (Issue #2029)
Can you post your code?
—
Reply to this email directly, view it on GitHub [github.com]<https://urldefense.com/v3/__https:/github.com/Esri/arcgis-python-api/issues/2029*issuecomment-2504399741__;Iw!!GaaboA!udOZykwjvUvb0am2YQY4hd44x096xrF2kmsjlWdN59r2_z8LXNXTibelcIcKXdD0zcYmSiVxj94ENJmHNkdN2jNr$>, or unsubscribe [github.com]<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/A6VIVVUINH4I5YLKIHT5P7T2CX4Z3AVCNFSM6AAAAABODJTBYKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMBUGM4TSNZUGE__;!!GaaboA!udOZykwjvUvb0am2YQY4hd44x096xrF2kmsjlWdN59r2_z8LXNXTibelcIcKXdD0zcYmSiVxj94ENJmHNuTl1aBe$>.
You are receiving this because you commented.Message ID: ***@***.******@***.***>>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
The swap_view function allows the ability to swap the source of the view to a different Hosted Feature Layer.
https://developers.arcgis.com/python/api-reference/arcgis.features.managers.html#arcgis.features.managers.FeatureLayerCollectionManager.swap_view
Hosted Feature Layer Views can only be configured against a single service.
When using the swap_view function, you pass the layer index, as well as the new layer source. The current function will never work where more than one layer exists in the view, as soon as you try and change one layer, an error is returned saying the view does not support multiple services, this is because the function requires a layer index.
To Reproduce
Steps to reproduce the behavior:
Assume 2 layers exist (0,1).
swap_view(0,"https://services-eu1.arcgis.com/xyz/arcgis/rest/services/ServiceName/FeatureServer/0")
error:
Expected behavior
It is expected that this function should be able to provide a mechanism to swap a view with multiple layers. I expect this is as designed, but it currently not very useful.
Platform (please complete the following information):
2.3.1
]The text was updated successfully, but these errors were encountered: