Add a point by lat, lon using featurelayer.applyEdits

Discussion created by bradstrittmatter on Aug 24, 2010
Latest reply on Aug 25, 2010 by khutchins-esristaff
What i'm trying to do is have a user enter in a lat/lon to create a point and save it to the featureclass.  It throws an error everytime, however it still saves the point but won't execute the onEditComplete event???  The error is "TypeError: cannot read property '876' of undefined".  I have no clue what the error means?

Below is the code which creates the point then inputs it into the applyEdits method for my featurelayer named surveyPointLayer.

I do have the proxy setup and working and the data lives in a SqlExpress ArcSDE geodatabase.  The projection i'm getting the point in is the same as the projection of the maplayer it's being saved to.

Any help is much appreciated!  Thanks!!!!

        var x = dojo.byId("txtX").value;
        var y = dojo.byId("txtY").value;
        var point = new esri.geometry.Point(x,y, new esri.SpatialReference({ wkid: 4326 }));

        var graphic = new esri.Graphic(point,null,null);
        surveyPointLayer.applyEdits([graphic],null,null, function(addResults) {