/**/var map=null; var mapcenter_lat=41.118143; var mapcenter_lng=1.256111; var MY_MAPTYPE_ID = 'mensula'; var stylez = [ { featureType: "all", elementType: "all", stylers: [ { hue: "#8BB42D" } ] },{ featureType: "road", elementType: "geometry", stylers: [ { visibility: "simplified" } ] },{ featureType: "road", elementType: "labels", stylers: [ { lightness: 53 } ] } ]; function inicializa_mapa_mensula(lat,lng,divid){ //alert("INIT MAP"); var myLatlng = new google.maps.LatLng(lat,lng); var myOptions = { zoom: 16, center: myLatlng, disableDefaultUI: true, panControl: false, zoomControl: true, mapTypeControl: true, scaleControl: false, streetViewControl: true, overviewMapControl: false, mapTypeControlOptions: { mapTypeIds: [google.maps.MapTypeId.SATELLITE , MY_MAPTYPE_ID] }, mapTypeId: MY_MAPTYPE_ID } map = new google.maps.Map(document.getElementById(divid), myOptions); //alert(map); var styledMapOptions = { name: "Plano" }; var tallersMapType = new google.maps.StyledMapType(stylez, styledMapOptions); map.mapTypes.set(MY_MAPTYPE_ID, tallersMapType); map.addMarker(myLatlng); } function attachMarkerMessage(marker) { var message="
\"LOGO"; message+="
"; var infowindow = new google.maps.InfoWindow( { content: message, maxWidth:400, size: new google.maps.Size(400,400) }); //infowindow.open(map,marker); google.maps.event.addListener(marker, 'click', function() { infowindow.open(map,marker); }); } google.maps.Map.prototype.addMarker = function(location) { var shadow = new google.maps.MarkerImage('http://mensula.cat/wp-content/themes/newmensula/images/shadow.png'); var image = new google.maps.MarkerImage('http://mensula.cat/wp-content/themes/newmensula/images/icon_empty.png'); var marker = new google.maps.Marker({ position: location, icon: image, animation: google.maps.Animation.DROP, shadow: shadow, map:this }); attachMarkerMessage(marker); };