2016-06-07 56 views

回答

1

可以使用PolyUtils方法從Google Maps API Utility Library

  • PolyUtils.encode方法編碼List<LatLng>String,你可以在你的數據庫存儲。
  • PolyUtils.decode方法將String解碼爲List<LatLng>,您可以使用地圖進行管理。

更新從註釋:

您將需要添加一個依賴(從the documentation):

dependencies { 
    compile 'com.google.maps.android:android-maps-utils:0.4+' 
} 
+0

可不可以給有關此方法的更多信息? 我的意思是,我必須導入外部庫嗎? –

相關問題