MCPcopy Create free account
hub / github.com/DHTMLX/scheduler / _updateEventLocation

Function _updateEventLocation

codebase/sources/dhtmlxscheduler.es.js:14118–14132  ·  view source on GitHub ↗
(event2)

Source from the content-addressed store, hash-verified

14116 return google.maps.LatLng(51.47784, -1492e-6);
14117 });
14118 let _updateEventLocation = async function(event2) {
14119 if (mapAdapter) {
14120 const coordinates = await mapAdapter.resolveAddress(event2.event_location);
14121 if (coordinates.lat && coordinates.lng) {
14122 event2.lat = +coordinates.lat;
14123 event2.lng = +coordinates.lng;
14124 } else {
14125 scheduler2.callEvent("onLocationError", [event2.id]);
14126 event2.lng = scheduler2.config.map_settings.error_position.lng;
14127 event2.lat = scheduler2.config.map_settings.error_position.lat;
14128 }
14129 scheduler2._latLngUpdate = true;
14130 scheduler2.callEvent("onEventChanged", [event2.id, event2]);
14131 }
14132 };
14133 let _delay = function(method, object, params, delay2) {
14134 setTimeout(function() {
14135 if (scheduler2.$destroyed) {

Callers

nothing calls this directly

Calls 2

callEventMethod · 0.65
resolveAddressMethod · 0.45

Tested by

no test coverage detected