Skip to content
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

create_view method does not work on hosted feature layers if layer ids are not in sequential order. #1841

Closed
ramcgreg opened this issue Jun 9, 2024 · 3 comments
Labels

Comments

@ramcgreg
Copy link

ramcgreg commented Jun 9, 2024

Describe the bug
create_view method does not work on hosted feature layers whose layer ids are not in sequential order. (ie unique layer ids has been enabled and layers were moved, EVEN IF YOU REALIZE YOU DID THIS AND TURN OFF ASSIGN UNIQUE IDS (pardon all caps)).
To Reproduce
Steps to reproduce the behavior:

source_search = gis.content.search("hosted feature service with layer ids NOT in sequential order")[0]
source_flc = FeatureLayerCollection.fromitem(source_search)

new_view = source_flc.manager.create_view(name="output view name")

error:

<copy the full error message here>

The resulting view has layers with differently ordered layer ids. When opened in map viewer, layers are out of order and often their type (point line polygon) is altered. Resulting view is completely unusable. See link to geonet post below.
Screenshots
If applicable, add screenshots to help explain your problem.
image

Expected behavior
A normal feature service view is created.

Platform (please complete the following information):

  • OS: [e.g. iOS] Windwos 11
  • Browser [e.g. chrome, safari] Chrome
  • Python API Version [e.g. 1.6.2] (you can get this by typing print(arcgis.__version__) Most recent verson on AGOL.

Additional context
Add any other context about the problem here, attachments etc.
https://community.esri.com/t5/arcgis-api-for-python-questions/create-view-does-not-work-with-non-sequential/m-p/1487937#M10144

@ramcgreg ramcgreg added the bug label Jun 9, 2024
@nanaeaubry
Copy link
Contributor

@ramcgreg

There is a parameter on the create view called preserve_layer_ids where the default is False. Have you tried with this set to True?

@ramcgreg
Copy link
Author

ramcgreg commented Jun 10, 2024 via email

@nanaeaubry
Copy link
Contributor

@ramcgreg Did this work?

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