Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Does someone know why the geometryType not always get returned from ArcGIS Server layers?

According to the API documentation Layer / Table the geometryType is returned on layers:

//properties specific to layers only 
"geometryType" : "<geometryType>",

But on some layers the resulting JSON looks like this:

"geometryType" : "",

The layers I'm testing on is our own and as far as I can see they are set up in the same manner,:capabilities with mapping and web access enabled. Dynamic layers. Some layers return the correct geometry type and some don't.

Update: Clearing the cache See rest admin does not help.

share|improve this question
    
Did you try clearing the REST API cache? –  Adam Armour Mar 7 '11 at 15:27
    
@Adam-Armour No, but I did now and it didn't help. –  MathiasWestin Mar 7 '11 at 15:34

1 Answer 1

up vote 2 down vote accepted

Is the SHAPE field visible in your MXD? If you obscure this field it is difficult to determine the nature of the geometry, so it may not display the geometryType.

We've had troubles with geometry operations with ArcObjects when the user hid the OBJECTID and SHAPE fields in ArcMap.

share|improve this answer
    
Correct, all layers that work has a field with the type esriFieldTypeGeometry and the layers that don't work are missing the field. –  MathiasWestin Mar 8 '11 at 7:55
1  
Found the same explanation on the ESRI forum as well: forums.esri.com/Thread.asp?c=158&f=2399&t=283085 –  MathiasWestin Mar 8 '11 at 15:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.