2013-10-24 61 views

回答

0

你需要知道CSS一點點以這種方式顯示的地圖...

<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script> 
<script> 
    var map,map2, map3; 

    function initialize(condition) { 
    // create the map 
     var myOptions = { 
      zoom: 14, 
      center: new google.maps.LatLng(41.1255275,-73.6964801), 
      mapTypeId: google.maps.MapTypeId.ROADMAP 
     } 
     var myOptions2 = { 
      zoom: 8, 
      center: new google.maps.LatLng(41.1255275,-73.6964801), 
      mapTypeId: google.maps.MapTypeId.TERRAIN 
     } 

     var myOptions3 = { 
      zoom: 2, 
      center: new google.maps.LatLng(41.1255275,-73.6964801), 
      mapTypeId: google.maps.MapTypeId.ROADMAP 
     } 
     map = new google.maps.Map(document.getElementById("map1"), myOptions); 
     map2 = new google.maps.Map(document.getElementById("map2"), myOptions2); 
     map3 = new google.maps.Map(document.getElementById("map3"), myOptions3); 
    } 

    google.maps.event.addDomListener(window, 'load', initialize); 
</script> 

<div style=" display:inline;" > 
    <div style=" float:left; width:50%;" > 
     <div id="map1" style="width:100%; height:100%; margin:0px;" ></div> 
    </div> 
    <div style="float:left; width:50%;" > 
     <div id="map2" style="width:100%px; height:50%; margin:0px;" ></div> 
     <div id="map3" style="width:100%px; height:50%; margin:0px;" ></div> 
    </div> 
</div>