I'm trying to add a point to a featureLayer. The user clicks on a point on the map, it is added to the featureLayer. It works but when the point is displayed it is shifted down and to the left of where the point was originally put on the map. When I step through the code I can see that the point going into newGraphic is the same as where the pointer is on the map, but when it is then redisplayed on the map it is shifted down and to the left. The pointer is an arrow and the point that is added ends up on the lower left portion of the head of the arrow instead of at the tip. I have compared my code to every piece I can find that works correctly but cannot find a setting or something that I may have missed.
drawToolbar.on("draw-end", function(evt) {
var scale = scaleUtils.getScale(map);
if(scale>24000.1){
alert("Please zoom in. Editing is not allowed at Map Scales less than 1:24,000.");
}else{
DisplayUtil.showLoading();
drawToolbar.deactivate();
editToolbar.deactivate();
var newAttributes = lang.mixin({}, selectedTemplate.template.prototype.attributes);
newAttributes.BUSINESSID = document.gisStartForm.businessId.value;
newAttributes.GIS_LOC_ID = document.gisStartForm.gisLocationId.value;
newAttributes.CREATEDBY = document.gisStartForm.userId.value;
newAttributes.DATECREATE = getTime();
var newGraphic = new Graphic(evt.geometry, null, newAttributes);
selectedTemplate.featureLayer.applyEdits([newGraphic], null, null
, function(addResults){
result = addResults[0];
if(result.success){
sketchExists = true;
pointExists = true;
pointModified = false;
pausejs(3000);
DisplayUtil.showTools();
selectPoint(newGraphic);
pointFeature = newGraphic;
document.gisStartForm.systemMessages.value = "null";
DisplayUtil.showMessages();
} else {
DisplayUtil.showTools();
applyEditsErrorHandler(result);
}
DisplayUtil.hideLoading();
}
, defaultErrorHandler);
}
//determine if point is within state boundaries
withinStateBoundary(newGraphic);
});