2011-06-28 32 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

接受它吧! –

相关问题