开发者

Can we display geographical border in Google Map V3 as we do in Google Earth, in satellite view?

开发者 https://www.devze.com 2023-03-16 06:48 出处:网络
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?

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!


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');
0

精彩评论

暂无评论...
验证码 换一张
取 消