Adding map click event and moving the edits after the feature layer has loaded.