【问题标题】:Can we display geographical border in Google Map V3 as we do in Google Earth, in satellite view?我们可以像在 Google Earth 中那样在卫星视图中显示地理边界吗?
【发布时间】:2011-06-28 07:04:20
【问题描述】:

我们能否在 Google Maps V3 的卫星视图中显示国家的地理边界,就像在卫星视图中谷歌地球中显示边界的方式一样?

谢谢!

【问题讨论】:

    标签: google-maps-api-3 google-earth satellite


    【解决方案1】:

    我相信这样的事情应该会给你在卫星视图中的边界。

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-01-09
      • 1970-01-01
      • 1970-01-01
      • 2013-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多