This commit is contained in:
2024-04-27 09:23:34 +02:00
commit 11e713ca6f
11884 changed files with 3263371 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
$(document)
.ready(
function() {
var mapProp = {
center : new google.maps.LatLng(52.05, 19.45),
zoom : 6,
mapTypeId : google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document
.getElementById("googleMapContainer"), mapProp);
var markers = JSON.parse(b64_to_utf8($('#googleMapMarkers')
.val()));
$.each(markers, function(index, m) {
var marker = new google.maps.Marker({
position : new google.maps.LatLng(m.lat, m.lng),
url : '/',
animation : google.maps.Animation.DROP,
customInfo : m.info,
title : m.title,
map : map
});
google.maps.event.addListener(marker, 'click',
markerClickFunction);
});
function markerClickFunction() {
infowindow = new google.maps.InfoWindow({
content : this.customInfo
});
infowindow.open(map, this);
closeInfoWindow(infowindow);
}
function closeInfoWindow(infoWindow) {
setTimeout(function() {
infoWindow.close();
}, 8000);
}
});
function b64_to_utf8(str) {
return decodeURIComponent(escape(window.atob(str)));
}