Select to view content in your preferred language

Create feature layer view with selected sub-layers/table in the source layer service

1001
3
03-08-2021 09:36 AM
MingHome
New Contributor III

Can I created an AGOL Layer View from a hosted Layer service, but only containing selected layers and tables, not all the layers and table in the source layer? I did not find a way to achieve this in the AGOL portal and wondering if this can be done with Python API.

Thanks,

Ming

Tags (1)
0 Kudos
3 Replies
by Anonymous User
Not applicable

Hi MingHome don't think it's feasible using Python.

JimmyWang
New Contributor II

That is good.

0 Kudos
Dirk_Vandervoort
Occasional Contributor

You can do this in Python:

  • Manually add layers to a FeatureLayerCollection. Pick and choose per your needs.
  • Use the create_view method on the FeatureLayerCollection
  • Reindex layers sequentially from 0 (this is a bug in ArcGIS Online). 
0 Kudos