Я получаю эту ошибку при запуске кода из документации Google по API GoogleMaps: https://developers.google.com/maps/documentation/javascript/customoverlays
Я пытаюсь следовать написанному, вот мой код:
var overlay;
CustomImageOverly.prototype = new google.maps.OverlayView();
function init() {
var pos= {lat: 62.323907, lng: -150.109291};
var mapProp= {
center:new google.maps.LatLng(pos),
zoom:4,
mapTypeId: google.maps.MapTypeId.TERRAIN,
styles: [{
featureType: 'water',
elementType: 'geometry',
stylers: [{color: '#3498DB'},
{visibility: 'on'}]
}]
};
var map = new google.maps.Map(document.getElementById("googleMap"),mapProp);
var bounds = new google.maps.LatLngBounds(
new google.maps.LatLng(62.281819, -150.287132),
new google.maps.LatLng(62.400471, -150.005608));
var srcImage = 'https://developers.google.com/maps/documentation/' +
'javascript/examples/full/images/talkeetna.png';
debugger;
overlay = new CustomImageOverly(bounds, srcImage, map);
}
function CustomImageOverly(bounds, image, map) {
this.bounds_ = bounds;
this.image_ = image;
this.map_ = map;
this.div_ = null;
this.setMap(map);
}
Что я делаю не так?