के अंदर काम नहीं करता है, मैं Google मानचित्र API का उपयोग करने की कोशिश कर रहा हूं और नक्शा को शामिल करने वाला div जो केवल दूसरे div के अंदर नहीं होता है। मैंने दो मानचित्रों के साथ थोड़ा सा नमूना कोड बनाया है, पहला काम दूसरा नहीं करता है। अगर मैं कोड के इस टुकड़े के कामकाज को हटा देता हूं, तो दोनों काम करते हैं। कोई विचार क्यों?Google मानचित्र एक div
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta content='application/xhtml+xml; charset=UTF-8' http-equiv='content-type' />
<style type='text/css'>
html { height: 100% }
body { height: 100%; margin: 0px; padding: 0px }
#map_canvas { height: 50% }
#map_canvas2 { height: 50% }
</style>
<title>Map</title>
<script src='http://maps.google.com/maps/api/js?sensor=false' type='text/javascript'></script>
<script type='text/javascript'>
function initialize() {
var latlng = new google.maps.LatLng(20, 20);
var myOptions = {
zoom: 8,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
var map2 = new google.maps.Map(document.getElementById("map_canvas2"), myOptions);
}
</script>
</head>
<body onload='initialize()'>
<div id='map_canvas'></div>
<div>
<div id='map_canvas2'></div>
</div>
</body>
</html>
यह है कि यह कैसे लग रहा है Firefox में और क्रोम की तरह है:
फ़ायरफ़ॉक्स – matpol
@matpol में ठीक काम करता है: वहाँ, मैं अपलोड मैं इसे कैसे फ़ायरफ़ॉक्स और क्रोम में देखते हैं। – Pablo
स्पष्ट रूप से, संक्रमणकालीन सिद्धांत भी काम करता है, इसलिए मैं इसके साथ जा रहा हूं। – Pablo