AnsweredAssumed Answered

Having trouble adding a feature to a feature service through leaflet.

Question asked by SchmidtNikolas on Aug 2, 2017
Latest reply on Aug 7, 2017 by SchmidtNikolas

So, I've got a feature service that I'd like to be able to add a feature to through a Leaflet map. I've got it set up so that when the user clicks anywhere on the map, a Bootstrap modal pops up and lets them enter information about that point, to be added as attributes. The points are added to the map with all the appropriate attributes, but they're all clustered around the origin (equator, prime meridian). I assumed this was an issue with the spatial reference, so I explicitly set it to a different spatial reference, but that didn't help. I then attempted to convert from decimal degrees to meters with some rough math, which got it away from the origin, but not anywhere near close to where it should be. Is there a way to convert from decimal degrees through either the Esri Javascript API or Esri Leaflet API? Are there other ways to make sure the correct spatial reference is being used? Are there simple mathematical formulas to convert from degrees to meters? Any other suggestions?


Thank you in advance!