I have this code and it won't work unless I pass a constant to data. What am I doing wrong?
function onMapClick(e) {
$.ajax({
url: "/temps",
type: "POST",
data: {coordinates: e.latlng},
success: function(response) {
// map.openPopup("hello", e.latlon);
alert(e.latlng.lat);
// return response;
}
});
};