在android MapFragment

时间:2015-05-15 11:08:49

标签: android google-maps google-maps-android-api-2 mapfragment

我有一个我想要修改的MapFragment对象,因此所有标签:县,街道等都不可见。这些县的边界也不可见...... 这样我才能获得地形。

我怎么能这样做?

2 个答案:

答案 0 :(得分:0)

您可以使用Google Maps API Styled Map Wizard,您可以设置地图的样式以查看您想要的样子,并将样式应用于Static Mapsapply the style to your map

[
  {
    "featureType": "poi",
    "stylers": [
      { "visibility": "off" }
    ]
  },{
    "featureType": "transit",
    "stylers": [
      { "visibility": "off" }
    ]
  },{
    "featureType": "road",
    "stylers": [
      { "visibility": "off" }
    ]
  },{
    "featureType": "administrative",
    "stylers": [
      { "visibility": "off" }
    ]
  },{
    "featureType": "water",
    "elementType": "labels",
    "stylers": [
      { "visibility": "off" }
    ]
  },{
    "featureType": "landscape",
    "elementType": "labels",
    "stylers": [
      { "visibility": "off" }
    ]
  },{
  }
]

答案 1 :(得分:0)

只需将地图类型指定为卫星即可获得足够接近的结果。

这里googleMap对象是MapFragment的地图:     googleMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);