google maps
by alessandro_pezzato
HTML
<script src="http://maps.google.com/maps/api/js?sensor=false&.js"></script>
<script src="http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerwithlabel/1.0.1/src/markerwithlabel.js"></script>
<div id="map-canvas" />
CSS
html {
height: 100%
}
body {
height: 100%;
margin: 0;
padding: 0
}
#map-canvas {
height: 100%
}
.gmnoprint {
display: none;
}
.label {
font-family: Arial;
font-size: 12px;
background-color: rgba(255, 255, 255, 0.7);
border: 1px solid #666;
padding: 4px;
border-radius: 8px;
}
}
JavaScript
var myLatlng = new google.maps.LatLng(45.465829, 8.920048);
var mapOptions = {
zoom: 16,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.ROADMAP,
}
var map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions);
new MarkerWithLabel({
position: new google.maps.LatLng(45.465829, 8.920048),
labelContent: "Chiesa Prepositurale di S.Vittore",
labelClass: "label",
map: map
});
new MarkerWithLabel({
position: new google.maps.LatLng(45.463, 8.925),
labelContent: "Tanataka gkjlj",
labelClass: "label",
map: map
});
new MarkerWithLabel({
position: new google.maps.LatLng(45.464, 8.924),
labelContent: "Portolo gkjlj",
labelClass: "label",
map: map
});
new MarkerWithLabel({
position: new google.maps.LatLng(45.465, 8.915),
labelContent: "Anfagolo uia na bastae",
labelClass: "label",
map: map
});
new MarkerWithLabel({
position: new google.maps.LatLng(45.462, 8.914),
labelContent: "Emberelo poliore mano",
labelClass: "label",
map: map
});
new MarkerWithLabel({
position: new google.maps.LatLng(45.461, 8.918),
labelContent: "Ambado lio nun",
labelClass: "label",
map: map
});
new MarkerWithLabel({
position: new google.maps.LatLng(45.468, 8.921),
labelContent: "Foo barabbi",
labelClass: "label",
map: map
});
new MarkerWithLabel({
position: new google.maps.LatLng(45.469, 8.913),
labelContent: "Ggdfg kl mklod",
labelClass: "label",
map: map
});
setTimeout(function () {
$('a').each(function () {
if ($(this).attr('target') == '_blank') {
$(this).hide();
}
});
}, 1000);