2013-10-02 58 views
0

出於某種原因,我有兩個標記顯示.. http://picpaste.com/Screen_Shot_2013-10-02_at_10.55.41_AM-qKfxgyCO.png定製和原來的標記顯示谷歌地圖API V3

還有周圍的整個事情的盒子。任何想法爲什麼這些會顯示出來?

var gmap; 

function initialize() { 

    var myLat = new google.maps.LatLng(33.991447,-84.09403); 

    var mapOptions = { 
    zoom: 13, 
    center: myLat, 
    mapTypeId: google.maps.MapTypeId.ROADMAP 
    }; 

    var gmap = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); 

    var mapIcon = '../fw/img/map-marker-lowres.png'; 

    var infowindowContent ='<div class="mapbox"><p><strong>The Arena at Gwinnett Center</strong></p>' + '<p>6400 Sugarloaf Pkwy<br>Duluth, GA 30097<br>(770) 813-7500</p>' + '<a href="http://goo.gl/maps/g3cs0">> get driving directions</a></div>'; 

    var infowindow = new google.maps.InfoWindow({ 
    content: infowindowContent, 
    maxWidth: 250, 

    }); 

    var marker = new google.maps.Marker({ 
    position: myLat, 
    icon: mapIcon, 
    map: gmap 
    }); 

     marker.setMap(gmap); 
     infowindow.open(gmap,marker); 

} 
+0

您發佈的代碼不會出現問題。 – geocodezip

+0

@geocodezip你還想看什麼? HTML和CSS? – PhDeOliveira

+0

如果您想獲得幫助,您需要發佈足夠的代碼(javascript/HTML/css)來重現問題。只要你發佈了你認爲重要的代碼(你曾經這麼做過),那麼展示該問題的小提琴或指向活動地圖的鏈接也將起作用。對我來說,似乎你有css問題。 – geocodezip

回答

1

一般的答案(現在你已經提出了正確的問題)是標準的InfoWindow不能以你想要的方式進行設計。您需要使用第三方庫,如InfoBubbleInfoBox或創建自己的自定義InfoWindow替換。

+0

感謝您花時間!我感謝幫助!不會想到這一點! – PhDeOliveira