Android Programming Press on the image to return to the main documentation page.

GoogleMaps

This library allows you to show maps from Google Maps service in your application.
It requires Android 4+ (API level 14+).
Please see the
tutorial for more information about the setup process.

List of types:

CameraPosition
GoogleMap
LatLng
MapFragment
MapUiSettings
Marker
Polyline

CameraPosition

The map view is modeled as a camera looking down on a flat plane.
See this link for more information about the possible values.

Events:

None

Members:


  Bearing As Float [read only]

  Initialize (Lat As Double, Lng As Double, Zoom As Float)

  Initialize2 (Lat As Double, Lng As Double, Zoom As Float, Bearing As Float, Tilt As Float)

  IsInitialized As Boolean

  Target As LatLng [read only]

  Tilt As Float [read only]

  Zoom As Float [read only]

Members description:

Bearing As Float [read only]
Returns the direction the camera is pointing at.
Initialize (Lat As Double, Lng As Double, Zoom As Float)
Initializes the camera position with the given latitude, longitude and zoom.
Initialize2 (Lat As Double, Lng As Double, Zoom As Float, Bearing As Float, Tilt As Float)
Initializes the camera position with the given latitude, longitude, zoom, bearing and tile.
IsInitialized As Boolean
Target As LatLng [read only]
Returns the location that the camera is pointing at.
Tilt As Float [read only]
Returns the tilt value.
Zoom As Float [read only]
Returns the zoom level.

GoogleMap


Events:

None

Members:


  AddMarker (Lat As Double, Lon As Double, Title As String) As Marker

  AddMarker2 (Lat As Double, Lon As Double, Title As String, HueColor As Float) As Marker

  AddMarker3 (Lat As Double, Lon As Double, Title As String, Bitmap As android.graphics.Bitmap) As Marker

  AddPolyline As Polyline

  AnimateCamera (NewPosition As com.google.android.gms.maps.model.CameraPosition)

  CameraPosition As CameraPosition [read only]

  Clear

  GetUiSettings As MapUiSettings

  HUE_AZURE As Float

  HUE_BLUE As Float

  HUE_CYAN As Float

  HUE_GREEN As Float

  HUE_MAGENTA As Float

  HUE_ORANGE As Float

  HUE_RED As Float

  HUE_ROSE As Float

  HUE_VIOLET As Float

  HUE_YELLOW As Float

  IsInitialized As Boolean

  MAP_TYPE_HYBRID As Int

  MAP_TYPE_NONE As Int

  MAP_TYPE_NORMAL As Int

  MAP_TYPE_SATELLITE As Int

  MAP_TYPE_TERRAIN As Int

  MapType As Int

  MoveCamera (NewPosition As com.google.android.gms.maps.model.CameraPosition)

  MyLocation As LatLng [read only]

  MyLocationEnabled As Boolean

  TrafficEnabled As Boolean

Members description:

AddMarker (Lat As Double, Lon As Double, Title As String) As Marker
Adds a marker to the map.
This method returns a Marker object which you can further customize.
AddMarker2 (Lat As Double, Lon As Double, Title As String, HueColor As Float) As Marker
Similar to AddMarker. The last parameter sets the marker's hue color. It should be
one of the HUE constants.
AddMarker3 (Lat As Double, Lon As Double, Title As String, Bitmap As android.graphics.Bitmap) As Marker
Similar to AddMarker. The last parameter sets the marker icon.
AddPolyline As Polyline
Adds a Polyline. This method returns a Polyline object which you should use to set the points.
AnimateCamera (NewPosition As com.google.android.gms.maps.model.CameraPosition)
Moves the camera to the new position. The movement is animated.
CameraPosition As CameraPosition [read only]
Returns the current camera position.
Clear
GetUiSettings As MapUiSettings
Returns a MapUiSettings object which you can use to configure the user interface.
HUE_AZURE As Float
HUE_BLUE As Float
HUE_CYAN As Float
HUE_GREEN As Float
HUE_MAGENTA As Float
HUE_ORANGE As Float
HUE_RED As Float
HUE_ROSE As Float
HUE_VIOLET As Float
HUE_YELLOW As Float
IsInitialized As Boolean
MAP_TYPE_HYBRID As Int
MAP_TYPE_NONE As Int
MAP_TYPE_NORMAL As Int
MAP_TYPE_SATELLITE As Int
MAP_TYPE_TERRAIN As Int
MapType As Int
Gets or sets the map type. The value should be one of the MAP_TYPE constants.
MoveCamera (NewPosition As com.google.android.gms.maps.model.CameraPosition)
Immediately moves the camera to the new position.
MyLocation As LatLng [read only]
Returns the current location. Will return an uninitialized object if the location is not available.
MyLocationEnabled As Boolean
Gets or sets whether the device location will be marked.
TrafficEnabled As Boolean
Gets or sets whether traffic data is drawn on the map (if such data is available).

LatLng

Holds latitude and longitude values.

Events:

None

Members:


  Initialize (Latitude As Double, Longitude As Double)

  IsInitialized As Boolean

  Latitude As Double [read only]

  Longitude As Double [read only]

Members description:

Initialize (Latitude As Double, Longitude As Double)
Initializes a new object.
IsInitialized As Boolean
Latitude As Double [read only]
Returns the latitude value.
Longitude As Double [read only]
Returns the longitude value.

MapFragment


This is an 'Activity Object', it cannot be declared under Sub Process_Globals.

Permissions:

android.permission.INTERNET
com.google.android.providers.gsf.permission.READ_GSERVICES
android.permission.ACCESS_COARSE_LOCATION
android.permission.ACCESS_FINE_LOCATION
$PACKAGE$.permission.MAPS_RECEIVE
android.permission.ACCESS_NETWORK_STATE

Events:

Ready
CameraChange (Position As CameraPosition)
Click (Point As LatLng)
LongClick (Point As LatLng)
MarkerClick (SelectedMarker As Marker) As Boolean 'Return True to consume the click

Members:


  DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map)

  GetMap As GoogleMap

  GetOpenSourceLicenseInfo As String

  Initialize (EventName As String, Parent As android.view.ViewGroup)

  IsGooglePlayServicesAvailable As Boolean

Members description:

DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map)
GetMap As GoogleMap
Returns the GoogleMap object. You should check that the object returned is initialized.
It will not be initialized if there was any error.
The map is only available after the Ready event fires.
GetOpenSourceLicenseInfo As String
Should not be used.
Initialize (EventName As String, Parent As android.view.ViewGroup)
Initializes this object and adds the map to the given parent.
IsGooglePlayServicesAvailable As Boolean
Tests whether Google Play Services area available.

MapUiSettings

Call GoogleMap.GetUiSettings to obtain this object.

Events:

None

Members:


  AllGesturesEnabled As Boolean [write only]

  CompassEnabled As Boolean

  IsInitialized As Boolean

  MyLocationButtonEnabled As Boolean

  RotateGesturesEnabled As Boolean

  ScrollGesturesEnabled As Boolean

  TiltGesturesEnabled As Boolean

  ZoomControlsEnabled As Boolean

  ZoomGesturesEnabled As Boolean

Members description:

AllGesturesEnabled As Boolean [write only]
Enables or disables all gestures.
CompassEnabled As Boolean
Gets or sets whether the compass is enabled.
IsInitialized As Boolean
MyLocationButtonEnabled As Boolean
Gets or sets whether the my-location button is enabled.
RotateGesturesEnabled As Boolean
Gets or sets whether rotate gestures are enabled.
ScrollGesturesEnabled As Boolean
Gets or sets whether scroll gestures are enabled.
TiltGesturesEnabled As Boolean
Gets or sets whether tilt gestures are enabled.
ZoomControlsEnabled As Boolean
Gets or sets whether zoom controls are enabled.
ZoomGesturesEnabled As Boolean
Gets or sets whether zoom gestures are enabled.

Marker

An icon placed on the map. Call GoogleMap.AddMarker to create such a marker.

Events:

None

Members:


  Draggable As Boolean

  InfoWindowShown As Boolean

  IsInitialized As Boolean

  Position As LatLng

  Remove

  Snippet As String

  Title As String

  Visible As Boolean

Members description:

Draggable As Boolean
Gets or sets whether the marker can be dragged by the user.
InfoWindowShown As Boolean
Gets or sets whether the info window is shown.
IsInitialized As Boolean
Position As LatLng
Gets or sets the marker position.
Remove
Removes the marker from the map.
Snippet As String
Gets or sets the snippet text that appears when the marker is clicked.
Title As String
Gets or sets the marker title.
Visible As Boolean
Gets or sets whether the marker is visible.

Polyline

A series of lines added to the map.
Call GoogleMap.AddPolyline to create this object.

Events:

None

Members:


  Color As Int

  Geodesic As Boolean

  IsInitialized As Boolean

  Points As List

  Remove

  Visibile As Boolean [read only]

  Visible As Boolean [write only]

  Width As Float

  ZIndex As Float

Members description:

Color As Int
Gets or sets the line color.
Geodesic As Boolean
Gets or sets whether the line segments are geodesic lines (shortest path on the earth surface) or straight lines.
The default value is False.
IsInitialized As Boolean
Points As List
Gets or sets the list of points that build the lines.
The list should hold objects of type LatLng.
Remove
Removes the line from the map.
Visibile As Boolean [read only]
Gets or sets whether this line is visible.
Visible As Boolean [write only]
Width As Float
Gets or sets the line width.
ZIndex As Float
Gets or sets the line z-index.
Top