Is there a way to get a Map or MapView
without placing a MapFragmet
inside a Layout
?
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-