Geometry could not be set

5069
2
Jump to solution
09-28-2012 06:13 PM
ChrisRiver
New Contributor III
Hi,

I am attempting to save geometry from a sketch layer.

My method /seems/ textbook to me, but perhaps there's something someone can spot that is throwing things off?

AGSFeatureTemplate *template = [self.geoLayer.templates objectAtIndex:0];// there is only 1 template self.newFeature = [self.geoLayer featureWithTemplate:template]; self.newFeature.geometry = self.sketchLayer.geometry; [self.geoLayer addFeatures:[NSArray arrayWithObject:self.newFeature]];


This results in:

{     error =     {         code = 1015;         description = "Geometry could not be set.";     };     globalId = "<null>";     objectId = 0;     success = 0; }


ANY ideas are welcome.  Google only produces a list of error codes... nothing else on this error.
0 Kudos
1 Solution

Accepted Solutions
ChrisRiver
New Contributor III
Just to clear this up.  It turned out to be an issue with how the feature class spatial reference was set up.  I tried adding geometry using the web API tools on the server and got an error indicating that the extent was out of bounds.  Once this was cleared up I didn't get the "Geometry could not be set" error message.

View solution in original post

0 Kudos
2 Replies
ChrisRiver
New Contributor III
Just to clear this up.  It turned out to be an issue with how the feature class spatial reference was set up.  I tried adding geometry using the web API tools on the server and got an error indicating that the extent was out of bounds.  Once this was cleared up I didn't get the "Geometry could not be set" error message.
0 Kudos
zhangbo
New Contributor
what's erroce code ?
0 Kudos