2011-06-28 55 views

回答

3

我相信像這樣應該給你在衛星視圖的邊界。

var custom-Style = [ 
        { featureType: "administrative.country", elementType: "all", stylers: [{ visibility: "on"}] }, 
        { featureType: "administrative.land_parcel", elementType: "all", stylers: [{ visibility: "on"}] } 
        ]; 

var myOptions = {mapTypeId: google.maps.MapTypeId.SATELLITE}; 

map = new google.maps.Map(document.getElementById("mapDiv"), myOptions); 

var styledMapOptions = { 
    name: "custom-Style" 
} 

var customMapType = new google.maps.StyledMapType(custom-Style, styledMapOptions); 

map.mapTypes.set('custom-Style', customMapType); 
map.setMapTypeId('custom-Style'); 
+0

接受它吧! –

相關問題