Skip to main content

GoogleMap

Namespace: Wisej.Web.Ext.GoogleMaps

Assembly: Wisej.Web.Ext.GoogleMaps

Represent an instance of the Google Maps widget.

public class GoogleMap : Widget

Constructors

Instance memberGoogleMap()

Constructs a new GoogleMap control.

Properties

Instance memberApiKey

String: Returns or sets the Google Maps API key.

Static memberGoogleMapsURL

String: Returns or sets the default location of the Google Maps library. The default is //maps.googleapis.com/maps/api/js

You can assign this value directly or set it under the application keys using the key name "GoogleMaps.URL". It cannot be changed or assigned after the component has been loaded the first time.

Instance memberInitScript

String: Overridden to create our initialization script.

Static memberLibraries

String: Gets or sets the Google Maps libraries to load. See: libraries.

Instance memberOptions

Object: Returns or sets the specified MapOptions: reference#MapOptions

Instance memberPackages

List<Package>: Overridden to return our list of script resources.

Static memberVersion

String: The Google Maps version to load.

See: versions.

Methods

Instance memberAddMarker(markerId, lat, lng, options, center)

Adds a new marker to the map.

ParameterTypeDescription
markerIdStringThe unique ID that identifies the marker.
latDoubleThe latitude of the marker.
lngDoubleThe longitude of the marker.
optionsObjectAn optional dynamic object that specifies the marker options: reference#MarkerOptions.
centerBooleanTrue to center the map after setting the marker.

Instance memberAddMarker(markerId, location, options, center)

Adds a new marker to the map.

ParameterTypeDescription
markerIdStringThe unique ID that identifies the marker.
locationLatLngAn instance of LatLng than identifies the location of the marker.
optionsObjectAn optional dynamic object that specifies the marker options: reference#MarkerOptions.
centerBooleanTrue to center the map after setting the marker.

Instance memberAddMarker(markerId, address, options, center)

Adds a new marker to the map.

ParameterTypeDescription
markerIdStringThe unique ID that identifies the marker.
addressStringThe address - to be geocoded - of the marker.
optionsObjectAn optional dynamic object that specifies the marker options: reference#MarkerOptions.
centerBooleanTrue to center the map after setting the marker.

Instance memberAddRoute(origin, destination, travelMode)

Uses GoogleMaps DirectionService to route and display a path between the origin and destination. See directions.

ParameterTypeDescription
originLatLngThe latitude and longitude of the origin.
destinationLatLngThe latitude and longitude of the destination.
travelModeTravelModeThe type of routing requested.

Instance memberAddRoute(origin, destination, travelMode)

Uses GoogleMaps DirectionService to route and display a path between the origin and destination. See directions.

ParameterTypeDescription
originStringThe name of the origin.
destinationStringThe name of the destination.
travelModeTravelModeThe type of routing requested.

Instance memberCenterMap(lat, lng)

Centers the map at the specified location.

ParameterTypeDescription
latDoubleThe latitude of the center of the map.
lngDoubleThe longitude of the center of the map.

Instance memberCenterMap(location)

Centers the map at the specified location.

ParameterTypeDescription
locationLatLngAn instance of LatLng than identifies the center of the map.

Instance memberCenterMap(address)

Centers the map at the specified address.

ParameterTypeDescription
addressStringThe address - to be geocoded - of the new center of the map.

Instance memberClearMarkers()

Removes all the markers from the map.

Instance memberClearRoutes()

Clears any routes, if they exist.

Instance memberCloseInfoWindow(markerId)

Closes the google.maps.InfoWindow related to the specified marker.

ParameterTypeDescription
markerIdStringThe marker unique ID.

Instance memberFitBounds(coordinates)

Centers the map around a set of coordinates.

ParameterTypeDescription
coordinatesLatLng[]

Instance memberGetGeocode(callback, address)

Retrieves geocode information.

ParameterTypeDescription
callbackAction<GeocoderResult[]>The callback method.
addressStringThe address.

Instance memberGetGeocode(callback, location)

Retrieves geocode information.

ParameterTypeDescription
callbackAction<GeocoderResult[]>The callback method.
locationLatLngThe location (latitude/longitude)/.

Instance memberGetGeocode(callback, lat, lng)

Retrieves geocode information.

ParameterTypeDescription
callbackAction<GeocoderResult[]>The callback method.
latDoubleThe latitude.
lngDoubleThe longitude.

Instance memberGetGeocodeAsync(address)

Asynchronously retrieves geocode information.

ParameterTypeDescription
addressStringThe address.

Returns: Task<GeocoderResult[]>.

Instance memberGetGeocodeAsync(location)

Asynchronously retrieves geocode information.

ParameterTypeDescription
locationLatLngThe location (latitude/longitude)/.

Returns: Task<GeocoderResult[]>.

Instance memberGetGeocodeAsync(lat, lng)

Asynchronously retrieves geocode information.

ParameterTypeDescription
latDoubleThe latitude.
lngDoubleThe longitude.

Returns: Task<GeocoderResult[]>.

Instance memberRemoveMarker(markerId)

Removes the marker.

ParameterTypeDescription
markerIdStringThe unique ID of the marker to remove.

Instance memberShowInfoWindow(markerId, html)

Shows an instance of the google.maps.InfoWindow class in relation to the marker.

ParameterTypeDescription
markerIdStringThe marker unique ID.
htmlStringHTML content to display in the info window.

Instance memberShowInfoWindow(markerId, options)

Shows an instance of the google.maps.InfoWindow class in relation to the marker.

ParameterTypeDescription
markerIdStringThe marker unique ID.
optionsObjectOptions for the creation of the InfoWindow. See infowindows.

Events

Instance memberMapClick

MapMouseEventHandler Fired when the user clicks on the map or a marker.

Instance memberMapDoubleClick

MapMouseEventHandler Fired when the user double clicks on the map or a marker.

Instance memberMapDragEnd

EventHandler Fired when the user drags the map.

Instance memberMapDragStart

EventHandler Fired when the user starts dragging the map.

Instance memberMapPropertyChanged

MapPropertyChangedEventHandler Fired when the user changes the map by zooming, tilting, or selecting a different map type.

Instance memberMarkerDragEnd

MarkerDragEventHandler Fired when the user drags a marker.

Instance memberMarkerDragStart

MarkerDragEventHandler Fired when the user begins dragging a marker.