问题
Can we display geographical borders of country in satellite view of Google Maps V3, similarly the way border is displayed in Google Earth in satellite view?
Thanks!
回答1:
I believe something like this should give you borders in satellite view.
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');
来源:https://stackoverflow.com/questions/6502807/can-we-display-geographical-border-in-google-map-v3-as-we-do-in-google-earth-in