error: function (x, status, error) {
if (x.status == 404) {
alert("1");
_.errserver()
}
else {
alert(status + "и еще: " + error);
}
},
beforeSend: function(x, status, error){
if (x.status == 404) {
alert("1");
}else {
_.startloader()
}
},
function initialize() {
var myLatLng = {lat: 55.6978, lng: 37.8592};
var iconDefault = '/images/icon/pinMap.png',
iconActive = '/images/icon/pinMap2.png';
var locations = [
{
position: {lat: 55.6978, lng: 37.8592},
icon: {
url: iconDefault,
}
}
];
var myMapOptions = {
.....
};
var map = new google.maps.Map(document.getElementById("map"), myMapOptions);
//marker
locations.forEach(function(o, n) {
var i = new google.maps.Marker({
position: o.position,
map: map,
icon: iconDefault
}),
i.addListener("click", function() {
i.setIcon( i !== this ? iconDefault : iconActive );
})
});
}
var infowindow = new google.maps.InfoWindow({
content: element.popupContent
});