回答

-1

創建資源/原材料,打了個比方

style_json.txt在文件中的JSON文件,提出:

[ 
    { 
    "featureType": "poi", 
    "stylers": [ 
     { "visibility": "off" } 
    ] 
    } 
] 

,然後在onMapReady:

@Override 
    public void onMapReady(GoogleMap googleMap) { 
     //your code 
     try { 
      boolean success = googleMap.setMapStyle(MapStyleOptions.loadRawResourceStyle(
          this, R.raw.style_json)); 

      if (!success) { 
       Log.e(TAG, "Style parsing failed."); 
      } 
     } catch (Resources.NotFoundException e) { 
      Log.e(TAG, "Can't find style. Error: ", e); 
     } 
     //your code 
    } 

來源:https://developers.google.com/maps/documentation/android-api/poi 和:https://developers.google.com/maps/documentation/android-api/hiding-features

+0

@BaummitAugen是更好的? –

+0

現在看起來好多了,謝謝。 (不是我的downvote順便說一句,我缺乏領域知識投票在此。) –

相關問題