GoogleMap

Wisej.Web.Ext.GoogleMaps.GoogleMap

Namespace: Wisej.Web.Ext.GoogleMaps

Assembly: Wisej.Web.Ext.GoogleMaps (3.2.0.0)

Represent an instance of the Google Maps widget.

public class GoogleMap : Widget

Constructors

GoogleMap()

Constructs a new GoogleMap control.

Properties

ApiKey

String: Returns or sets the Google Maps API key.

GoogleMapsURL

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.

InitScript

String: Overridden to create our initialization script.

Libraries

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

Options

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

Packages

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

Version

String: The Google Maps version to load.

See: versions.

Methods

AddMarker(markerId, lat, lng, options, center)

Adds a new marker to the map.

Parameter
Type
Description

markerId

The unique ID that identifies the marker.

lat

The latitude of the marker.

lng

The longitude of the marker.

options

An optional dynamic object that specifies the marker options: reference#MarkerOptions.

center

True to center the map after setting the marker.

AddMarker(markerId, location, options, center)

Adds a new marker to the map.

Parameter
Type
Description

markerId

The unique ID that identifies the marker.

location

An instance of LatLng than identifies the location of the marker.

options

An optional dynamic object that specifies the marker options: reference#MarkerOptions.

center

True to center the map after setting the marker.

AddMarker(markerId, address, options, center)

Adds a new marker to the map.

Parameter
Type
Description

markerId

The unique ID that identifies the marker.

address

The address - to be geocoded - of the marker.

options

An optional dynamic object that specifies the marker options: reference#MarkerOptions.

center

True to center the map after setting the marker.

AddRoute(origin, destination, travelMode)

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

Parameter
Type
Description

origin

The latitude and longitude of the origin.

destination

The latitude and longitude of the destination.

travelMode

The type of routing requested.

AddRoute(origin, destination, travelMode)

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

Parameter
Type
Description

origin

The name of the origin.

destination

The name of the destination.

travelMode

The type of routing requested.

CenterMap(lat, lng)

Centers the map at the specified location.

Parameter
Type
Description

lat

The latitude of the center of the map.

lng

The longitude of the center of the map.

CenterMap(location)

Centers the map at the specified location.

Parameter
Type
Description

location

An instance of LatLng than identifies the center of the map.

CenterMap(address)

Centers the map at the specified address.

Parameter
Type
Description

address

The address - to be geocoded - of the new center of the map.

ClearMarkers()

Removes all the markers from the map.

ClearRoutes()

Clears any routes, if they exist.

CloseInfoWindow(markerId)

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

Parameter
Type
Description

markerId

The marker unique ID.

FitBounds(coordinates)

Centers the map around a set of coordinates.

Parameter
Type
Description

coordinates

GetGeocode(callback, address)

Retrieves geocode information.

Parameter
Type
Description

callback

The callback method.

address

The address.

GetGeocode(callback, location)

Retrieves geocode information.

Parameter
Type
Description

callback

The callback method.

location

The location (latitude/longitude)/.

GetGeocode(callback, lat, lng)

Retrieves geocode information.

Parameter
Type
Description

callback

The callback method.

lat

The latitude.

lng

The longitude.

GetGeocodeAsync(address)

Asynchronously retrieves geocode information.

Parameter
Type
Description

address

The address.

Returns: Task<GeocoderResult[]>.

GetGeocodeAsync(location)

Asynchronously retrieves geocode information.

Parameter
Type
Description

location

The location (latitude/longitude)/.

Returns: Task<GeocoderResult[]>.

GetGeocodeAsync(lat, lng)

Asynchronously retrieves geocode information.

Parameter
Type
Description

lat

The latitude.

lng

The longitude.

Returns: Task<GeocoderResult[]>.

RemoveMarker(markerId)

Removes the marker.

Parameter
Type
Description

markerId

The unique ID of the marker to remove.

ShowInfoWindow(markerId, html)

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

Parameter
Type
Description

markerId

The marker unique ID.

html

HTML content to display in the info window.

ShowInfoWindow(markerId, options)

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

Parameter
Type
Description

markerId

The marker unique ID.

options

Options for the creation of the InfoWindow. See infowindows.

Events

MapClick

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

MapDoubleClick

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

MapDragEnd

EventHandler Fired when the user drags the map.

MapDragStart

EventHandler Fired when the user starts dragging the map.

MapPropertyChanged

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

MarkerDragEnd

MarkerDragEventHandler Fired when the user drags a marker.

MarkerDragStart

MarkerDragEventHandler Fired when the user begins dragging a marker.

Last updated

Was this helpful?