2013-08-16 55 views
1

我有嵌入我的聯繫頁面上的谷歌地圖,輸入/輸出的谷歌變焦不工作還怎麼做我添加信息框 這裏是我的鏈接谷歌地圖的控制沒有顯示

http://www.spheretekk.com/safari/map-lax.html

這裏是我在Chrome截圖

http://www.safarikidindia.com/ss.jpg

這裏是我的uodated JS

< script type = "text/javascript" > 

function initialize() { 
//Initalize JS after onload 
var map = new google.maps.Map(document.getElementById('map_canvas'), { 

    mapTypeId: google.maps.MapTypeId.ROADMAP, 
}); 




var randomPoint0 = new google.maps.LatLng(22.59373, 72.94922); 
//First Location 


var marker0 = new google.maps.Marker({ 
    //Set up marker 
    position: randomPoint0, 
    map: map 
}); 

google.maps.event.addDomListener(document.getElementById('locationid0'), 'click', //Set up DOM listener 1 
function() { 
    map.setZoom(13); 
    map.setCenter(marker0.getPosition()); 

}); 




var randomPoint1 = new google.maps.LatLng(19.01626, 72.84019); 
//First Location 
var contentString = '<div id="content">' + 
    '<div id="siteNotice">' + 
    '</div>' + 
    '<h2 id="firstHeading" class="firstHeading">Uluru</h2>' + 
    '<div id="bodyContent">' + 
    '<p><b>Uluru</b>, also referred to as <b>Ayers Rock</b>, is a large ' + 
    'sandstone rock formation in the southern part of the ' + 
    'Northern Territory, central Australia. It lies 335 km (208 mi) ' + 
    'south west of the nearest large town, Alice Springs; 450 km ' + 
    '(280 mi) by road. Kata Tjuta and Uluru are the two major ' + 
    'features of the Uluru - Kata Tjuta National Park. Uluru is ' + 
    'sacred to the Pitjantjatjara and Yankunytjatjara, the ' + 
    'Aboriginal people of the area. It has many springs, waterholes, ' + 
    'rock caves and ancient paintings. Uluru is listed as a World ' + 
    'Heritage Site.</p>' + 
    '<p>Attribution: Uluru, <a href="http://en.wikipedia.org/w/index.php?title=Uluru&oldid=297882194">' + 
    'http://en.wikipedia.org/w/index.php?title=Uluru</a> (last visited June 22, 2009).</p>' + 
    '</div>' + 
    '</div>'; 

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

var marker1 = new google.maps.Marker({ 
    //Set up marker 
    position: randomPoint1, 
    map: map 
}); 

google.maps.event.addDomListener(document.getElementById('city'), 'change', //Set up DOM listener 1 
function() { 
    map.setZoom(13); 
    map.setCenter(marker1.getPosition()); 

}); 









map.setCenter(marker0.getPosition()); 
map.setZoom(5); 
} 
google.maps.event.addListener(marker, 'click', function() { 
infowindow.open(map, marker); 
}); 



< /script> 

我在想什麼或做錯了什麼?

+0

你能告訴導致問題的代碼?此外,沒有Google地圖會顯示在您的聯繫網頁上(在Chrome中)。 – putvande

+0

[Google Map Infowindow無法正常顯示]的可能重複(http://stackoverflow.com/questions/9663375/google-map-infowindow-not-showing-properly) –

+0

[Google Maps API V3:奇怪的UI顯示可能重複毛刺(截圖)](http://stackoverflow.com/questions/7471830/google-maps-api-v3-weird-ui-display-glitches-with-screenshot) – geocodezip

回答

2

問題應該是因爲普遍img{max-width: 100%;}

嘗試在你的CSS這一個

.gmnoprint img { 
    max-width: none; 
} 
0

嘗試在你的CSS這一個

.gmnoprint>* { 
    left: 0; 
}