...
function loadMapAOI() {
if (GBrowserIsCompatible()) {
map = new GMap2(document.getElementById("aoi-select-map"));
map.setCenter(new GLatLng(55.737162319794564, 37.544617652893066), 10);
$('btnNext').disabled = true;
if (EDIT_AOI)
{
map.enableGoogleBar();
map.enableContinuousZoom();
map.enableScrollWheelZoom();
map.enableDragging();
map.enableDoubleClickZoom();
map.addControl(new GSmallMapControl());
} else {
map.disableDragging();
}
//Prevent mouse wheel from scrolling page when cursor is over map
var c = map.getContainer(); // reference to map DIV
if(Browser.isMoz()) {
var mozTarget = Browser.os == 0 ? window : c;
Event.ignore(mozTarget, 'DOMMouseScroll');
} else {
map.enableScrollWheelZoom();
Event.ignore(c, 'mousewheel');
}
if(window.AOI_ARRAY) {
loadDefinedAOI();
}
}
}
...
Event.observe(window, 'load', loadMapAOI);