B4A Library GoogleMapView

A wrap for this Github project. Posting the following:
1. B4A project.
2. B4A library files - copy them to your additional library folder
3. The Java code


Sample code(smack bang on the Eifel Tower):
B4X:
#Region  Project Attributes
    #ApplicationLabel: b4aGoogleMapView
    #VersionCode: 1
    #VersionName:
    'SupportedOrientations possible values: unspecified, landscape or portrait.
    #SupportedOrientations: portrait
    #CanInstallToExternalStorage: False
#End Region

#Region  Activity Attributes
    #FullScreen: False
    #IncludeTitle: True
#End Region

Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.

End Sub


Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.

    Private gmv1 As GoogleMapView
    Private gmv2 As GoogleMapView
End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    Activity.LoadLayout("main")
    gmv1.Latitude = 48.858240
    gmv1.Longitude = 2.294938
    gmv1.MapZoom = 18
    gmv1.MapScale = gmv1.MAP_SCALE_LOW
    gmv1.MapType = gmv1.MAP_TYPE_SATELLITE
    
    gmv2.Latitude = 48.858240
    gmv2.Longitude = 2.294938
    gmv2.MapZoom = 18
    gmv2.MapScale = gmv2.MAP_SCALE_LOW
    gmv2.MapType = gmv2.MAP_TYPE_ROADMAP

End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

You need to have an active internet connection to use this lib.

1.png
 

Attachments

  • TheJavaCode.zip
    7.5 KB · Views: 218
  • b4aGoogleMapView.zip
    8 KB · Views: 279
  • b4aLibFiles.zip
    118 KB · Views: 290
  • 1.png
    1.png
    194.8 KB · Views: 203
Top