Can anyone tell me why I'm getting the error in the title using the code below? I'm about at my wits end with Esri. I literally copied the simplest example of creating a graphic and placing it on a map that I can find and it still doesn't work. Anytime I try to create a point, it throws this exception. It works fine(no exception) if I add "x: 0, y: 0" to the point geometry, but then I get a Point somewhere in the Atlantic somewhere near Africa; presumably because the easting/northing values are 0. It just seems to ignore the geo coordinates. I need to use only lat/lon values.
const simpleMarkerSymbol = {
type: "simple-marker",
color: [255, 0, 0],
outline: { color: [255, 255, 255], width: 0 }
};
const pointGraphic = new Graphic(
{
geometry: { type: "point", longitude: location.lon, latitude: location.lat },
symbol: simpleMarkerSymbol
}
);
graphicsLayer.add(pointGraphic);
Yes the map, layers, etc are all running fine and the lat/lon values are verified present and sane. It's just the Point that doesn't show because of the above exception.