HERE Map/MapView without using MapFragment

后端 未结 1 1430
别那么骄傲
别那么骄傲 2021-01-15 12:01

Is there a way to get a Map or MapView without placing a MapFragmet inside a Layout?



        
相关标签:
1条回答
  • 2021-01-15 12:45

    You can have a com.here.android.mpa.mapping.MapView in your layout without the use of a fragment.

    Simply call new com.here.android.mpa.mapping.Map() and call com.here.android.mpa.mapping.MapView#setMap( map ) to attach the map to the map view.

    Note you can only attach each map to a single map view. Also, make sure to call Mapview#onPause() and MapView#onResume() or the underlying textureview will not work correctly!

    References: https://developer.here.com/documentation/android-premium/api_reference_java/com/here/android/mpa/mapping/MapView.html#setMap-com.here.android.mpa.mapping.Map-

    0 讨论(0)
提交回复
热议问题