there is an error on clicking on the map is triggered in, time. arrives in Promise, null. Explain why this is happening? Thank you in advance:
onMapClick(e) {
if (e.latlng) {
this.post("/api/MapObjectItem/GetObjectInfoByLatLng", {
Lat: e.latlng.lat,
Lng: e.latlng.lng
}).then(result => {
if (this.jkh.isCreateEvent) {
this.jkh.selectedMessage = {
Address: result.Address,
Lat: result.Lat,
Lon: result.Lng,
UsersDataID: this.$auth.user.Id,
ObjectID: result.Id,
ToPublish: false
};
this.$refs.map.mapObject.setView([result.Lat, result.Lng], 18);
this.showDetails();
} else {
this.obj = result;
this.changeView();
}
});
}