Android Question Google Map - Suppressing Google 'Maps & Directions' Icons [Solved]

RichardN

Well-Known Member
Licensed User
Longtime User
In an implementation of Google Maps with satellite view I am showing several bitmap markers that have snippets that open when tapped.

When the snippet is opened two Google icons, a blue arrow and maps icon appear in the bottom RH corner. If clicked they take the user out of the app to the Google maps app. Is there a UI setting that suppresses these icons to give a clean map?
 

RichardN

Well-Known Member
Licensed User
Longtime User
I found an example on Stack Overflow that can be applied using the reflector method to remove the Map Toolbar

Suppress Map Toolbar:
Private r As Reflector
r.Target = gMap.GetUiSettings
r.RunPublicmethod("setMapToolbarEnabled", Array As Object(False), Array As String("java.lang.boolean"))
 
Upvote 0

RichardN

Well-Known Member
Licensed User
Longtime User
Actually there's an even simpler/easier way using a Java Object:

B4X:
Private jo As JavaObject
jo = gMap.GetUiSettings
jo.RunMethod("setMapToolbarEnabled", Array As Object(False))
 
Upvote 1
Top