function GMap() {
var latlng=[
{"id":"340","act":"n","title":"„Lennusadam“ Museum","lat":"59.4514110","lng":"24.7384100","url":"https://www.allplacestovisit.com/estonia/tallinn/lennusadam-museum/","img":"https://www.allplacestovisit.com/upl/places/2019/lennusadam-museum.jpg"},
{"id":"358","act":"n","title":"Tallinn Old Town ","lat":"59.4375530","lng":"24.7439380","url":"https://www.allplacestovisit.com/estonia/tallinn/tallinn-old-town-/","img":"https://www.allplacestovisit.com/upl/places/2019/tallinn-old-town-358.jpg"},
{"id":"359","act":"n","title":"Kadriorg – Elegant park & fi...","lat":"59.4377790","lng":"24.7902760","url":"https://www.allplacestovisit.com/estonia/tallinn/kadriorg-elegant-park-fine-art/","img":"https://www.allplacestovisit.com/upl/places/2019/kadriorg-elegant-park-fine-art.jpg"},
{"id":"361","act":"y","title":"Tallinna lauluväljak (Song Fe...","lat":"59.4446430","lng":"24.8065320","url":"https://www.allplacestovisit.com/estonia/tallinn/tallinna-lauluvljak-song-festival-grounds/","img":"https://www.allplacestovisit.com/upl/places/2019/tallinna-lauluvljak-song-festival-grounds.jpg"},
{"id":"363","act":"n","title":"Kumu Art Museum","lat":"59.4362320","lng":"24.7960060","url":"https://www.allplacestovisit.com/estonia/tallinn/kumu-art-museum/","img":"https://www.allplacestovisit.com/upl/places/2019/kumu-art-museum.jpg"},
{"id":"366","act":"n","title":"Kadriorg Palace","lat":"59.4384670","lng":"24.7909040","url":"https://www.allplacestovisit.com/estonia/tallinn/kadriorg-palace/","img":"https://www.allplacestovisit.com/upl/places/2019/kadriorg-palace.jpg"},
];
var iw=null;
$(function() {
var map_center=new google.maps.LatLng(59.4290386,24.7554020);
var icon={url:('img/i_pin.svg'),size:new google.maps.Size(36,36),origin:new google.maps.Point(0,0),anchor:new google.maps.Point(18,36),scaledSize:new google.maps.Size(36,36)};
var icon_act={url:('img/i_pin_act.svg'),size:new google.maps.Size(44,44),origin:new google.maps.Point(0,0),anchor:new google.maps.Point(22,44),scaledSize:new google.maps.Size(44,44)};
var mapOptions={center:map_center,zoom:11,maxZoom:17,streetViewControl:false,panControl:false,mapTypeId:'roadmap',mapTypeControl:true,scaleControl:false,streetViewControl:false,rotateControl:false,fullscreenControl:false,zoomControl:true,zoomControlOptions:{style:google.maps.ZoomControlStyle.SMALL}};
var map=new google.maps.Map(document.getElementById('map'), mapOptions);
var iw=new google.maps.InfoWindow({content:''});
$.each(latlng, function(i, m) {
if(m.act=='y'){var marker=new google.maps.Marker({position: new google.maps.LatLng(m.lat, m.lng),bounds:true,id:'o'+m.id,letter:m.index,map:map,icon:icon_act,title:m.title});}
else{var marker=new google.maps.Marker({position: new google.maps.LatLng(m.lat, m.lng),bounds:true,id:'o'+m.id,letter:m.index,map:map,icon:icon,title:m.title});}
google.maps.event.addListener(map,'click',function(){iw.close();});
google.maps.event.addListener(marker,'click',function(){iw.close();iw.setContent(contentString);iw.open(map,marker);});
if(m.img==''){var contentString=''+ m.title +'';}
else{var contentString=''+ m.title +'
';}
});
});
}