Google Maps
Last updated
Was this helpful?
Last updated
Was this helpful?
(part of package '') Extends designtime/SolutionModel: Extends runtime:
A Servoy Extra Component that wraps Google Maps functionality.
This is a reference page; many components have detailed usage guides .
URL of a KML Layer to overlay on the map. Type:
API key for accessing Google Maps services. Type:
Configuration settings for directions functionality. Type:
Flag indicating whether the fullscreen control is displayed. Type: Default Value: true
Called when a map event occurs.
Parameters:
Called when a marker event occurs.
Parameters:
Called when a marker is geocoded.
Parameters:
Called when the route on the map changes.
Parameters:
Adds the given marker
Parameters:
Adds the given markers
Parameters:
Center google maps at the given address
Example:
Parameters:
Center google maps at LatLng
Example:
Parameters:
Creates a new, empty marker with the given marker ID and position
Parameters:
Sets the viewport to contain the given bounds.
Parameters:
Returns the lat/lng bounds of the current viewport. If more than one copy of the world is visible, the
bounds range in longitude from -180 to 180 degrees inclusive. If the map is not yet initialized (i.e.
the mapType is still null), or center and zoom have not been set then the result is null
or undefined
.
Returns the position displayed at the center of the map
Returns the marker with the given index
Parameters:
Returns the marker with the given markerId
Parameters:
Returns all markers
Add a new google marker to the map
Example:
@deprecated please use addMarkers(markers, index)
instead
Parameters:
Refresh google maps
Example:
Remove all google markers
Example:
Remove google marker at given index
Example:
Parameters:
Parameters:
Represents a latitude/longitude coordinate. scripting type: CustomType<googlemaps-svy-G-Maps.latLng>
lat
The latitude value.
Default Value: 0
lng
The longitude value.
Default Value: 0
Represents the bounds of the map as a rectangle defined by southwest and northeast coordinates. scripting type: CustomType<googlemaps-svy-G-Maps.latLngBounds>
ne
The northeast coordinate.
sw
The southwest coordinate.
Represents a segment (leg) of a route. scripting type: CustomType<googlemaps-svy-G-Maps.leg>
distance
The distance of the leg as a formatted string.
distance_meters
The distance of the leg in meters.
duration
The duration of the leg as a formatted string.
duration_seconds
The duration of the leg in seconds.
end_address
The ending address of the leg.
end_markerId
The markerId of the ending marker.
start_address
The starting address of the leg.
start_markerId
The markerId of the starting marker.
Represents a marker on the Google Map. scripting type: CustomType<googlemaps-svy-G-Maps.marker>
addressDataprovider
Data provider for the marker's address.
addressString
The address string of the marker.
animation
The animation applied to the marker (e.g. BOUNCE or DROP).
Default Value: null
clickable
Flag indicating whether the marker is clickable.
Default Value: true
crossOnDrag
Flag indicating whether a cross is shown while dragging.
Default Value: true
cursor
Cursor style when hovering over the marker.
draggable
Flag indicating whether the marker is draggable.
Default Value: false
drawRadius
Flag indicating whether to draw a radius around the marker.
Default Value: false
iconLabel
Label text for the marker's icon.
iconMedia
Media object for the marker's icon.
iconUrl
URL for the marker's icon image.
infoWindowString
HTML content for the marker's info window.
latitude
Latitude of the marker (deprecated; use position instead).
longitude
Longitude of the marker (deprecated; use position instead).
markerId
Unique identifier for the marker.
opacity
The opacity of the marker.
Default Value: 1
position
The position of the marker as a latLng object.
radiusColor
The color of the radius drawn around the marker.
Default Value: "#AA0000"
radiusMeters
The radius in meters for drawing around the marker.
Default Value: 2000
title
Title of the marker.
tooltip
Tooltip text for the marker (deprecated; use title instead).
userObject
User-defined object associated with the marker.
visible
Flag indicating whether the marker is visible.
Default Value: true
zIndex
The z-index of the marker.
Represents the result of a route calculation. scripting type: CustomType<googlemaps-svy-G-Maps.routeResult>
legs
An array of legs representing segments of the route.
total_distance
The total distance of the route.
total_duration
The total duration of the route.
Represents settings for routing and directions on the map. scripting type: CustomType<googlemaps-svy-G-Maps.routeSettings>
avoidFerries
Flag indicating whether to avoid ferries in route calculations.
Default Value: false
avoidHighways
Flag indicating whether to avoid highways in route calculations.
Default Value: false
avoidTolls
Flag indicating whether to avoid tolls in route calculations.
Default Value: false
optimize
Flag indicating whether route optimization is enabled.
Default Value: true
travelMode
The travel mode for the route (e.g. driving, walking, bicycling, transit).
Default Value: "driving"
Specifies how gesture handling is configured for the map. Type: Default Value: "auto"
Configuration for map events. Type:
Unique identifier for the map instance. Used to differentiate between multiple map components on a single form. Type:
The map type to display. Possible values include "ROADMAP", "SATELLITE", "HYBRID", and "TERRAIN". Type: Default Value: "ROADMAP"
Flag indicating whether the map type control is displayed. Type: Default Value: true
Configuration for marker events. Type:
Array of marker objects displayed on the map. Type: Default Value: []
GMaps height to be set in a responsive form. When responsiveHeight is set to 0, the component will use 100% height of the parent container Type: Default Value: 300
Flag indicating whether the street view control is displayed. Type: Default Value: true
CSS style classes applied to the Google Maps component. Type:
Flag indicating whether Google Map clustering is enabled. Type: Default Value: false
Flag indicating whether Google Map directions are enabled. Type: Default Value: false
Flag indicating whether the Google Maps component is visible. Type:
Flag indicating whether the zoom control is displayed. Type: Default Value: true
Data provider for setting the initial zoom level of the map. Type:
{} event The event object associated with the map event.
{} [latLng] The latitude/longitude coordinates associated with the event (optional).
{} event The event object associated with the marker event.
{} markerIndex The index of the marker for which the event occurred.
{} [latLng] The latitude/longitude coordinates associated with the event (optional).
{} marker The marker that was geocoded.
{} latLng The latitude/longitude coordinates of the geocoded marker.
{} routeDetails The route result details.
{} marker The marker object to add.
{} [index] Starting point where to add the marker (useful to add waypoints in routes in a specific order)
{} markers An array of marker objects to add.
{} [index] Starting point where to add the markers (useful to add waypoints in routes in a specific order)
{} address The address to center the map on.
Returns: True if the map was successfully centered; otherwise, false.
{} lat The latitude coordinate.
{} lng The longitude coordinate.
Returns: True if the map was successfully centered; otherwise, false.
{} markerId The unique identifier for the marker.
{} addressOrLatLng The address string or latitude/longitude coordinates for the marker position.
{} [title] Optional title for the marker.
Returns: The created marker object.
{} latLngBounds The bounds to fit within the viewport.
Returns: The latitude/longitude boundaries of the current viewport.
Returns: The latitude/longitude position at the center of the map.
{} index The index of the marker to retrieve.
Returns: The marker object at the specified index.
{} markerId The unique identifier of the marker.
Returns: The marker object with the specified ID.
Returns: An array containing all marker objects currently displayed on the map.
{} markers An array of marker objects to add.
{} [index] Starting point where to add the markers
Returns: True if the map was successfully refreshed; otherwise, false.
Returns: True if all markers were successfully removed; otherwise, false.
{} index The index of the marker to remove.
Returns: True if the marker was successfully removed; otherwise, false.
Set Google Maps options. See here: the list of available options.
{} options The configuration options for customizing the map.
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type: