0
我用谷歌地圖使用自定義信息窗口
http://jsfiddle.net/hashie5/KYtnb/
當u單擊該標記
我如何可以使用標準的信息窗口它彈出,如谷歌使用的地圖本身
例如:http://maps.google.be/maps?q=Jaarbeurslaan,+Genk&hl=nl&ll=50.965036,5.485032&spn=0.01046,0.033023&sll=51.09623,4.227975&sspn=1.335072,4.22699&oq=jaar&hnear=Jaarbeurslaan,+3600+Genk,+Limburg,+Vlaams+Gewest&t=m&z=16&iwloc=A谷歌地圖的標準信息窗口
所以我可以用「Routebeschrijving」(路線)鏈接等
function initialize() {
var myLatlng = new google.maps.LatLng(50.965049,5.484231);
var myOptions = {
zoom: 14,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
var contentString =
'<div id="infowindow">' +
'Galaconcert<br />' +
'Jaarbeurslaan 2-6<br />' +
'3690 Genk' +
'</div>'
;
var infowindow = new google.maps.InfoWindow();
var marker = new google.maps.Marker({
position: myLatlng,
map: map,
title: 'Galaconcert'
});
google.maps.event.addListener(marker, 'click', function() {
infowindow.setContent(contentString);
infowindow.open(map, marker);
});
}
$(function(){
initialize();
});