async funct < /p>
Код: Выделить всё
mapLoader = new MapLoader('@ViewData["MapType"]', [''],@ViewData["Lat"],@ViewData["Lng"], '@ViewData["ApiKey"]', '@ViewData["Region"]');
map = await mapLoader.getMap();
historicalRoutesManager = new HistoricalRouteManager(map);
drawRoutesManager = new DrawRouteManager(map);
infowindow = new google.maps.InfoWindow({
pixelOffset: new google.maps.Size(0, 303),
});
// Close the infowindow when clicking on the map.
google.maps.event.addListener(map, "click", function (e) {
infowindow.id = null;
infowindow.tenantId = null;
infowindow.close(map, this);
isOpened = false;
});
Подробнее здесь: https://stackoverflow.com/questions/793 ... oogle-maps