function GMap() {
var latlng=[
{"id":"169","act":"n","title":"Basilica Sagrada Familia","lat":"41.4036380","lng":"2.1743560","url":"https://www.allplacestovisit.com/spain/barcelona/basilica-sagrada-familia/","img":"https://www.allplacestovisit.com/upl/places/2019/basilica-sagrada-familia.jpg"},
{"id":"170","act":"n","title":"Casa Mila","lat":"41.3953830","lng":"2.1619610","url":"https://www.allplacestovisit.com/spain/barcelona/casa-mila/","img":"https://www.allplacestovisit.com/upl/places/2019/casa-mila.jpg"},
{"id":"171","act":"n","title":"Casa Batlo","lat":"41.3916400","lng":"2.1647690","url":"https://www.allplacestovisit.com/spain/barcelona/casa-batlo/","img":"https://www.allplacestovisit.com/upl/places/2019/casa-batlo.jpg"},
{"id":"172","act":"n","title":"Plaça Catalunya the Square of...","lat":"41.3870240","lng":"2.1700460","url":"https://www.allplacestovisit.com/spain/barcelona/plaa-catalunya-the-square-of-catalonia/","img":"https://www.allplacestovisit.com/upl/places/2019/plaa-catalunya-the-square-of-catalonia.jpg"},
{"id":"173","act":"n","title":"Barcelona Arc de Triomphe","lat":"41.3910540","lng":"2.1806440","url":"https://www.allplacestovisit.com/spain/barcelona/barcelona-arc-de-triomphe/","img":"https://www.allplacestovisit.com/upl/places/2019/barcelona-arc-de-triomphe173.jpg"},
{"id":"174","act":"n","title":"Ciutadella Park","lat":"41.3881480","lng":"2.1862120","url":"https://www.allplacestovisit.com/spain/barcelona/ciutadella-park/","img":"https://www.allplacestovisit.com/upl/places/2019/ciutadella-park.jpg"},
{"id":"175","act":"n","title":"The Barcelona Cathedral","lat":"41.3839630","lng":"2.1761980","url":"https://www.allplacestovisit.com/spain/barcelona/the-barcelona-cathedral/","img":"https://www.allplacestovisit.com/upl/places/2019/the-barcelona-cathedral.jpg"},
{"id":"176","act":"y","title":"Casa de l'Ardiaca (L'...","lat":"41.3840990","lng":"2.1757510","url":"https://www.allplacestovisit.com/spain/barcelona/casa-de-lardiaca-lardiaca-house/","img":"https://www.allplacestovisit.com/upl/places/2019/casa-de-lardiaca-lardiaca-house.jpg"},
{"id":"177","act":"n","title":"Plaça sant Felip Neri","lat":"41.3834480","lng":"2.1750440","url":"https://www.allplacestovisit.com/spain/barcelona/plaa-sant-felip-neri/","img":"https://www.allplacestovisit.com/upl/places/2019/plaa-sant-felip-neri.jpg"},
{"id":"179","act":"n","title":"The Roman Temple of Augustus","lat":"41.3833920","lng":"2.1771640","url":"https://www.allplacestovisit.com/spain/barcelona/the-roman-temple-of-augustus/","img":"https://www.allplacestovisit.com/upl/places/2019/the-roman-temple-of-augustus179.jpg"},
{"id":"180","act":"n","title":"Columbus Monument, Barcelona","lat":"41.3758100","lng":"2.1777680","url":"https://www.allplacestovisit.com/spain/barcelona/columbus-monument-barcelona/","img":"https://www.allplacestovisit.com/upl/places/2019/columbus-monument-barcelona.jpg"},
{"id":"181","act":"n","title":"La Ramblas","lat":"41.3850260","lng":"2.1705930","url":"https://www.allplacestovisit.com/spain/barcelona/la-ramblas/","img":"https://www.allplacestovisit.com/upl/places/2019/la-ramblas181.jpg"},
{"id":"182","act":"n","title":"Barceloneta Beach","lat":"41.3795350","lng":"2.1930930","url":"https://www.allplacestovisit.com/spain/barcelona/barceloneta-beach/","img":"https://www.allplacestovisit.com/upl/places/2019/barceloneta-beach.jpg"},
{"id":"183","act":"n","title":"Park Güell","lat":"41.4144930","lng":"2.1535990","url":"https://www.allplacestovisit.com/spain/barcelona/park-gell/","img":"https://www.allplacestovisit.com/upl/places/2019/park-gell.jpg"},
{"id":"184","act":"n","title":"Plaça Espanya","lat":"41.3750500","lng":"2.1491230","url":"https://www.allplacestovisit.com/spain/barcelona/plaa-espanya/","img":"https://www.allplacestovisit.com/upl/places/2019/plaa-espanya.jpg"},
{"id":"185","act":"n","title":"Olympic Stadium Lluís","lat":"41.3647800","lng":"2.1556700","url":"https://www.allplacestovisit.com/spain/barcelona/olympic-stadium-llus/","img":"https://www.allplacestovisit.com/upl/places/2019/olympic-stadium-llus.jpg"},
{"id":"186","act":"n","title":"Cosmo Caixa Science Museum","lat":"41.4129960","lng":"2.1315510","url":"https://www.allplacestovisit.com/spain/barcelona/cosmo-caixa-museum/","img":"https://www.allplacestovisit.com/upl/places/2019/cosmo-caixa-museum.jpg"},
{"id":"187","act":"n","title":"Montserrat Monastery","lat":"41.5933500","lng":"1.8376760","url":"https://www.allplacestovisit.com/spain/barcelona/montserrat-monastery/","img":"https://www.allplacestovisit.com/upl/places/2019/montserrat-monastery.jpg"},
{"id":"188","act":"n","title":"Castle Santa Florentine","lat":"41.6007560","lng":"2.5767760","url":"https://www.allplacestovisit.com/spain/barcelona/castle-santa-florentine/","img":"https://www.allplacestovisit.com/upl/places/2019/castle-santa-florentine.jpg"},
{"id":"189","act":"n","title":"La Boqueria","lat":"41.3817420","lng":"2.1715850","url":"https://www.allplacestovisit.com/spain/barcelona/la-boqueria/","img":"https://www.allplacestovisit.com/upl/places/2019/la-boqueria.jpg"},
{"id":"190","act":"n","title":"Barcelona City History Museum","lat":"41.3839070","lng":"2.1778380","url":"https://www.allplacestovisit.com/spain/barcelona/barcelona-city-history-museum/","img":"https://www.allplacestovisit.com/upl/places/2019/barcelona-city-history-museum.jpg"},
{"id":"191","act":"n","title":"Fundació Joan Miró","lat":"41.3686400","lng":"2.1598520","url":"https://www.allplacestovisit.com/spain/barcelona/fundaci-joan-mir/","img":"https://www.allplacestovisit.com/upl/places/2019/fundaci-joan-mir.jpg"},
{"id":"192","act":"n","title":"Palau de la Música Catalana","lat":"41.3875770","lng":"2.1753130","url":"https://www.allplacestovisit.com/spain/barcelona/palau-de-la-msica-catalana/","img":"https://www.allplacestovisit.com/upl/places/2019/palau-de-la-msica-catalana.jpg"},
{"id":"193","act":"n","title":"Museum Picasso","lat":"41.3852170","lng":"2.1808910","url":"https://www.allplacestovisit.com/spain/barcelona/museum-picasso/","img":"https://www.allplacestovisit.com/upl/places/2019/museum-picasso.jpg"},
{"id":"194","act":"n","title":"Market - Mercat de Santa Cater...","lat":"41.3861930","lng":"2.1779140","url":"https://www.allplacestovisit.com/spain/barcelona/market-mercat-de-santa-caterina/","img":"https://www.allplacestovisit.com/upl/places/2019/market-mercat-de-santa-caterina.jpg"},
{"id":"195","act":"n","title":"d’Art Contemporani de Barcel...","lat":"41.3831930","lng":"2.1668670","url":"https://www.allplacestovisit.com/spain/barcelona/dart-contemporani-de-barcelona-museum/","img":"https://www.allplacestovisit.com/upl/places/2019/dart-contemporani-de-barcelona-museum.jpg"},
{"id":"197","act":"n","title":"Tibidabo Amusement Park","lat":"41.4217740","lng":"2.1195800","url":"https://www.allplacestovisit.com/spain/barcelona/tibidabo-amusement-park/","img":"https://www.allplacestovisit.com/upl/places/2019/tibidabo-amusement-park.jpg"},
{"id":"198","act":"n","title":"A Rooftop Pool at the Mandarin...","lat":"41.3911730","lng":"2.1666280","url":"https://www.allplacestovisit.com/spain/barcelona/rooftop-pool-at-the-mandarin-oriental/","img":"https://www.allplacestovisit.com/upl/places/2019/rooftop-pool-at-the-mandarin-oriental.jpg"},
{"id":"199","act":"n","title":"Icebarcelona","lat":"41.3853090","lng":"2.1970440","url":"https://www.allplacestovisit.com/spain/barcelona/icebarcelona/","img":"https://www.allplacestovisit.com/upl/places/2019/icebarcelona.jpg"},
{"id":"200","act":"n","title":"Barcelona Zoo","lat":"41.3863630","lng":"2.1898450","url":"https://www.allplacestovisit.com/spain/barcelona/barcelona-zoo/","img":"https://www.allplacestovisit.com/upl/places/2019/barcelona-zoo.jpg"},
{"id":"201","act":"n","title":"CASA VICENS","lat":"41.4035220","lng":"2.1506240","url":"https://www.allplacestovisit.com/spain/barcelona/casa-vicens/","img":"https://www.allplacestovisit.com/upl/places/2019/casa-vicens.jpg"},
{"id":"202","act":"n","title":"Museum Nacional d'Art de ...","lat":"41.3684420","lng":"2.1535700","url":"https://www.allplacestovisit.com/spain/barcelona/museum-nacional-dart-de-catalunya-mnac/","img":"https://www.allplacestovisit.com/upl/places/2019/museum-nacional-dart-de-catalunya-mnac.jpg"},
{"id":"203","act":"n","title":"Parc del Laberint d'Horta","lat":"41.4403330","lng":"2.1456260","url":"https://www.allplacestovisit.com/spain/barcelona/parc-del-laberint-dhorta/","img":"https://www.allplacestovisit.com/upl/places/2019/parc-del-laberint-dhorta.jpg"},
{"id":"637","act":"n","title":"Palace of Catalan Music","lat":"41.3875752","lng":"2.1752913","url":"https://www.allplacestovisit.com/spain/barcelona/palace-of-catalan-music/","img":"https://www.allplacestovisit.com/upl/places/2021/palace-of-catalan-music.jpg"},
];
var iw=null;
$(function() {
var map_center=new google.maps.LatLng(41.3735670,2.1830920);
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:10,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 +'
';}
});
});
}