Android Question Add controls to google maps?

rscheel

Well-Known Member
Licensed User
Longtime User
As I can put these buttons on the map?

Captura.PNG
 

rscheel

Well-Known Member
Licensed User
Longtime User
That's the Map toolbar.
Enabled or disabled using the java method:

B4X:
UiSettings.setMapToolbarEnabled(boolean).

You'll probably have to use JavaObject to access the java method.

[edit]More info can be found here: https://www.b4x.com/android/forum/threads/google-map-controls.53018/#post-332137[/edit]

Dear was looking at the link, I made the code as follows but does not work, do not know what I'm doing wrong.

B4X:
Sub MapFragment1_Ready
    gmap = MapFragment1.GetMap
   
    Dim JavaMapsObject As JavaObject
    JavaMapsObject = gmap.GetUiSettings
    JavaMapsObject.RunMethod("setMapToolbarEnabled", Array As Object(True))

    Dim cp As CameraPosition
    cp.Initialize(-33.469119900000000000 , -70.641997000000000000, 15)
    gmap.AnimateCamera(cp)
End Sub

Captura2.PNG Captura.PNG Captura3.PNG
 
Upvote 0
Top