Студія дизайну

google.maps.event.addDomListener(window, ‘load’, init);
var map;
function init() {
var mapOptions = {
center: new google.maps.LatLng(49.857796,384.025335),
zoom: 16,
zoomControl: true,
zoomControlOptions: {
style: google.maps.ZoomControlStyle.DEFAULT,
},
disableDoubleClickZoom: true,
mapTypeControl: true,
mapTypeControlOptions: {
style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR,
},
scaleControl: true,
scrollwheel: false,
panControl: true,
streetViewControl: true,
draggable : true,
overviewMapControl: true,
overviewMapControlOptions: {
opened: false,
},
mapTypeId: google.maps.MapTypeId.ROADMAP,
}
var mapElement = document.getElementById(‘map’);
var map = new google.maps.Map(mapElement, mapOptions);
var locations = [
[‘bakery’, ‘undefined’, ‘undefined’, ‘undefined’, ‘undefined’, 49.857539, 24.018176, ‘/wp-content/uploads/2016/10/pin_small.png’]
];
for (i = 0; i < locations.length; i++) {
if (locations[i][1] ==’undefined’){ description =”;} else { description = locations[i][1];}
if (locations[i][2] ==’undefined’){ telephone =”;} else { telephone = locations[i][2];}
if (locations[i][3] ==’undefined’){ email =”;} else { email = locations[i][3];}
if (locations[i][4] ==’undefined’){ web =”;} else { web = locations[i][4];}
if (locations[i][7] ==’undefined’){ markericon =”;} else { markericon = locations[i][7];}
marker = new google.maps.Marker({
icon: markericon,
position: new google.maps.LatLng(locations[i][5], locations[i][6]),
map: map,
title: locations[i][0],
desc: description,
tel: telephone,
email: email,
web: web
});
link = ”; }

}

Залишити відповідь

Ваша e-mail адреса не оприлюднюватиметься. Обов’язкові поля позначені *