du kunne også lave en event.addListener og kigge på infowindow
google
gmaps infowindowhttp://code.google.com/p/gmaps-samples-v3/source/browse/trunk/single-infowindow/single-infowindow.html?r=262i css
.infobox{
background-color: #FF0000;
}
map.js
function initialize() {
var map = document.getElementById("map_canvas");
map.style.display = "";
map.style.width = (parseInt(screen.width) + 100) + "px";
map.style.height = (parseInt(screen.height) + 100) + "px";
var myLatlng = new google.maps.LatLng(55.66665, 12.55937);
var myOptions = {
zoom: 17,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
var image = 'grafik/diverse/pin.png';
var myLatLng = new google.maps.LatLng(55.66665, 12.55937);
var marker = new google.maps.Marker({
position: myLatLng,
map: map,
icon: image
});
var myWindowOptions = {
content: '<div class ="infobox"> Her Bor Vi <br/> jeg må hellere lave et linje skift, så vi kan fylde boxen up og evt lave den størrer men hvis den kan klippe linjen over</div>'
};
var myInfoWindow = new google.maps.InfoWindow(myWindowOptions);
google.maps.event.addListener(marker, 'mouseover', function() {
myInfoWindow.open(map,marker);
});
google.maps.event.addListener(marker, 'mouseout', function() {
myInfoWindow.close();
});
}