Issue
MapToolbar along with a marker is shown on map, when toolbar is clicked it redirects to google map. I want to disable this functionality.
map_view.xml
<com.google.android.gms.maps.MapView
xmlns:map="http://schemas.android.com/apk/res-auto"
android:id="@+id/summary_mv_map"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_alignParentLeft="true"
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
map:liteMode="true"/>
what I tried: added mapView.getUiSettings().setMapToolbarEnabled(false)
, but not able to resolve getUiSettings().setMapToolbarEnabled().
Note: Don't want to remove marker
Solution
Get GoogleMap
object via getMapAsync
, after that disable toolbar
mapView.getMapAsync(new OnMapReadyCallback() {
@Override
public void onMapReady(GoogleMap googleMap) {
googleMap.getUiSettings().setMapToolbarEnabled(false);
}
});
Answered By - Stas Parshin
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.