Select to view content in your preferred language

Single Feature Service View from Multiple Parent Services

255
4
Jump to solution
07-12-2024 03:11 PM
BrianBasarich
Emerging Contributor

I just want to confirm, a hosted feature service view can only have layers and tables from a single parent service, is that correct?

If so, is there a reason for this limitation?  The layer definitions passed to the REST API addToDefiniton method contain an attribute that identifies the parent service.  So, the structure of the API seems to support it.

I'm not trying to combine layers from different parent services into a single layer in my view.  Instead, I'm trying to group different layers from different parent feature services into a single feature service view.  For example, county layers from a US_Counties feature service and city layers from a US_Cities feature service.

I know I can accomplish this same thing, somewhat, with a webmap, but why can't I do this with a feature service view?

0 Kudos
1 Solution

Accepted Solutions
ChristopherCounsell
MVP Regular Contributor

A View is based on a data source. It will inherit from the source. You can't really combine multiple hosted feature layers sources into one view. You could republish the data sources as one hosted Feature Layer, and create views from that. It's designed to control access and capabilities to the data.

There is a new capability called Group Layer Items that may be want you are looking for. You take several layers or views and save them as an item. Seems like a layer file in ArcGIS Pro.

https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/group-layer-items-a-new-way-to-bring...

 

View solution in original post

0 Kudos
4 Replies
ChristopherCounsell
MVP Regular Contributor

A View is based on a data source. It will inherit from the source. You can't really combine multiple hosted feature layers sources into one view. You could republish the data sources as one hosted Feature Layer, and create views from that. It's designed to control access and capabilities to the data.

There is a new capability called Group Layer Items that may be want you are looking for. You take several layers or views and save them as an item. Seems like a layer file in ArcGIS Pro.

https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/group-layer-items-a-new-way-to-bring...

 

0 Kudos
BrianBasarich
Emerging Contributor

Thanks for the reply.  I thought it was the case, but just wanted to confirm since the API design could support it.  All of the layers come from a file geodatabases that are uploaded to AGOL, and I could easily combine them all into a single GDB before uploading, but was trying to keep with several smaller GDBs instead of one large one.

Thanks again.

0 Kudos
ChristopherCounsell
MVP Regular Contributor

Did you try saving as a group layer item? It sounds like what you are asking for... Combine a few layers and save them as an item.

0 Kudos
BrianBasarich
Emerging Contributor

I haven't yet, but will look into it.  I'm developing a hands-off system for pushing data to AGOL and creating AGOL views that calls the REST API from a .NET environment.  The file GDBs are created from C# using the Esri.FileGDPAPI, so it's easy for me to just create one large GDB that includes all the layers in a single data source.  If working with the large GDB proves to be a nuisance, I'll look into figuring out the REST API calls to create group layer items in AGOL.  Thanks again for all of your help.

0 Kudos