why does "applyEdits" doesn't get x,y coordinates as exampled
Hello, On all of the official examples here: 1, 2 and 3, applyEdits gets geometry like this:
geometry: { x: -120, y: 45, spatialReference: { wkid: 4326 } }
or just
geometry: { x: -120, y: 45 }
But when I try to pass in the example I get this error:

When I check, applyEdits gets IFeature, and IFeature geometry gets IGeometry which defined like this:
export interface IGeometry {
spatialReference?: ISpatialReference;
}
And ISpatialReference defined like this:
export interface ISpatialReference {
wkid?: number;
latestWkid?: number;
vcsWkid?: number;
latestVcsWkid?: number;
wkt?: string;
latestWkt?: string;
}
Shouldn't IFeature get geometry as an IPoint??
It's defined like this:
export interface IPoint extends IHasZM, IGeometry {
x: number;
y: number;
z?: number;
}
Hey @gavinr.
IFeature[geometry] does have a type issue. It needs to be a list of geometry types and not the shared IGeometry.
I won't PR b/c of the all the work going on.
It you want to fix it, it's a pretty simple.
Hey @gavinr.
IFeature[geometry]does have a type issue. It needs to be a list of geometry types and not the sharedIGeometry.I won't PR b/c of the all the work going on.
It you want to fix it, it's a pretty simple.
Look's great. Why not PR this AS IS?
I can fork, commit and PR if you would like (I want it to be included in the official pkg for use in firebase-cloud functions).
fc64c99d434ed812c2c09849828a8beec8f106ae looks good to me, thanks @COV-GIS. If you want to PR, that's fine, we can merge it upstream with our many version v4 changes.
We got this in to the v4 branch in #1010. Closing. If there's still an issue after the next release, please let us know. Thanks again @COV-GIS