Error adding rest service, "Can't add layer. (Shape field missing)."

796
2
Jump to solution
04-12-2022 11:49 AM
BrittanyBurson
Occasional Contributor III

I am getting an error "Can't add layer. (Shape field missing)." trying to add rest services hosted in our 10.8.1 Enterprise server into a web map.

They add and display if I add the entire collection of service endpoints ie. https://webmaps.city.gov/arcgis/rest/services/{sample_folder}/MapServer but not via single endpoint ie. https://webmaps.city.gov/arcgis/rest/services/{sample_folder}/MapServer/32 

However, adding as an entire collection does not let me move the layer up or down in the map contents -- it must sit as the bottom layer.

BrittanyBurson_0-1649788984372.png

I see the shape fields visible in the service information...

BrittanyBurson_1-1649789059513.png

As well as when I pull the layer into Pro 2.9.2. I can open the table and view the features, but not see the features on the map, despite the field being visible.

BrittanyBurson_2-1649789122267.png

Thoughts? I have tried searching this error in the existing Community posts but have not had any luck.

Thank you

1 Solution

Accepted Solutions
TanuHoque
Esri Regular Contributor

@BrittanyBurson 

I can't seem to find the Shape field in the Field list screenshot you shared. It has Shape_Length and Shape_Area but not Shape. As you know, that usually happens when you publish a map service with Shape field's visibility turned off. It is the reason Map Viewer throws the error and Pro doesn't display features on the map.

 

However, adding as an entire collection does not let me move the layer up or down in the map contents 

On this one, if you have Dynamic Layers capability enabled for this map service, then you should be able move/shuffle child layers within the map service layer. Not sure if that is going to help you in this case, but I just wanted to mention here for other users who might come across this post later.

View solution in original post

2 Replies
TanuHoque
Esri Regular Contributor

@BrittanyBurson 

I can't seem to find the Shape field in the Field list screenshot you shared. It has Shape_Length and Shape_Area but not Shape. As you know, that usually happens when you publish a map service with Shape field's visibility turned off. It is the reason Map Viewer throws the error and Pro doesn't display features on the map.

 

However, adding as an entire collection does not let me move the layer up or down in the map contents 

On this one, if you have Dynamic Layers capability enabled for this map service, then you should be able move/shuffle child layers within the map service layer. Not sure if that is going to help you in this case, but I just wanted to mention here for other users who might come across this post later.

BrittanyBurson
Occasional Contributor III

Thanks so much for your reply @TanuHoque. I was hoping there would be a way to work with it without needing to republish, but you're right, the Shape field is indeed missing in the service screenshot. Appreciate the guidance and info about dynamic layers!