谷歌地图infowindow方向链接

时间:2013-04-16 11:19:57

标签: jquery google-maps infowindow

我已将谷歌地图纳入我的主页,以便我的客户能够轻松找到我。我的问题是我找不到像这里包含方向链接的方法:

Direct link example

我的代码:

jQuery(document).ready(function(){ 
    var myLatlng = new google.maps.LatLng(48.562944, 16.079245);
    var myOptions = {
      center: myLatlng,
      zoom: 16,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    var map = new google.maps.Map(document.getElementById("map"),  myOptions);
    var marker = new google.maps.Marker({
      position: myLatlng,
      map: map,
      title:"Mehr Informationen!"
    });

var infowindow = new google.maps.InfoWindow({});

google.maps.event.addListener(marker, 'click', function() {
    infowindow.setContent("<b>Company</b><br>Street<br>Town"); //sets the       content of your global infowindow to string "Tests: "
    infowindow.open(map,marker); //then opens the infowindow at the marker
});
marker.setMap(map);
});

我是一位没有经验的用户,正在努力学习和理解。我希望你能帮助我解决我的问题。

0 个答案:

没有答案
相关问题