Uses GoogleMap JavaScript V3 API to show a map inside WebView. GoogleMap.AsPane returns a Pane which should be added to the nodes tree. The map is only ready after Ready event is raised. Requires Java 8+.
Events:
Ready CameraChange (Position As CameraPosition) Click (Point As LatLng) CircleClick (SelectedCircle As MapCircle) MarkerClick (SelectedMarker As Marker) PolygonClick (SelectedPolygon As MapPolygon) PolylineClick (SelectedPolyline As MapPolyline)
Adds a circle to the map. Center - Position of the circle center. Radius - Circle radius. StrokeWidth - Stroke width. StrokeColor - Stroke color. FillColor - Inner color. Opacity - Inner color opacity. Value between 0 to 1.
Adds a marker to the map with a custom icon. The IconUri must point to an online image or an image from the assets folder. In the later case the custom icon will only appear in Release mode. Example: gmap.AddMarker2(10, 10, "This is a test", _
File.GetUri(File.DirAssets, "SomeIcon.png"))
Adds a polygon to the map. Points - A list or array of LatLng points. StrokeWidth - Stroke width. StrokeColor - Stroke color. FillColor - Inner color. Opacity - Inner color opacity. Value between 0 to 1.
Adds a polyline to the map. Points - A list or array of LatLng points. Width - Line width. Color - Line color.
AsPaneAsConcretePaneWrapper [read only]
Returns the pane that holds the map.
BoundsAsLatLongBounds [read only]
Returns the LatLongBounds of the visual area. It is recommended to read Bounds only inside the CameraChange event because its values may be incorrect otherwise.
CameraPositionAsCameraPosition [read only]
Returns the current camera position.
CloseInfoWindow (InfoWindowAsMapInfoWindow)
Closes the specified info window.
FitBounds (boundsAsLatLongBounds)
Moves the map to ensure the given bounds fit within the viewport. Note that the Google Maps API will add a margin around these bounds.
Initializes the map. The Ready event will be raised when the map is ready. EventName - Sets the subs that will handle the events. Options - MapOptions object. Pass Null for the default options.
Sets the map type. The value should be one of the MAP_TYPE constants.
MoveCamera (NewPositionAsCameraPosition)
Moves the camera position.
MoveCamera2 (NewPositionAsLatLng)
Moves the camera position.
PanToBounds (boundsAsLatLongBounds)
Pans the map by the minimum amount necessary to contain the given LatLongBounds. It makes no guarantee where on the map the bounds will be, except that as much of the bounds as possible will be visible.