packages/core/src/lib/services/google-maps-api-wrapper.ts
Wrapper class that handles the communication with the Google Maps Javascript API v3
constructor(_loader: MapsAPILoader, _zone: NgZone)
|
|||||||||
Parameters :
|
clearInstanceListeners |
clearInstanceListeners()
|
Returns :
any
|
createBicyclingLayer |
createBicyclingLayer()
|
Creates a BicyclingLayer instance for a map
Returns :
Promise<google.maps.BicyclingLayer>
a new bicycling layer object |
createCircle | ||||||
createCircle(options: google.maps.CircleOptions)
|
||||||
Creates a google.map.Circle for the current map.
Parameters :
Returns :
Promise<google.maps.Circle>
|
createDataLayer | ||||||
createDataLayer(options?: google.maps.Data.DataOptions)
|
||||||
Creates a new google.map.Data layer for the current map
Parameters :
Returns :
Promise<google.maps.Data>
|
createInfoWindow | ||||||
createInfoWindow(options?: google.maps.InfoWindowOptions)
|
||||||
Parameters :
Returns :
Promise<google.maps.InfoWindow>
|
createMap | |||||||||
createMap(el: HTMLElement, mapOptions: google.maps.MapOptions)
|
|||||||||
Parameters :
Returns :
Promise<void>
|
createMarker | ||||||||||||
createMarker(options: google.maps.MarkerOptions, addToMap: boolean)
|
||||||||||||
Creates a google map marker with the map context
Parameters :
Returns :
Promise<google.maps.Marker>
|
createPolygon | ||||||
createPolygon(options: google.maps.PolygonOptions)
|
||||||
Parameters :
Returns :
Promise<google.maps.Polygon>
|
createPolyline | ||||||
createPolyline(options: google.maps.PolylineOptions)
|
||||||
Parameters :
Returns :
Promise<google.maps.Polyline>
|
createRectangle | ||||||
createRectangle(options: google.maps.RectangleOptions)
|
||||||
Creates a google.map.Rectangle for the current map.
Parameters :
Returns :
Promise<google.maps.Rectangle>
|
createTransitLayer |
createTransitLayer()
|
Creates a TransitLayer instance for a map
Returns :
Promise<google.maps.TransitLayer>
a new transit layer object |
fitBounds | |||||||||
fitBounds(latLng: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral, padding?: number | google.maps.Padding)
|
|||||||||
Parameters :
Returns :
Promise<void>
|
getBounds |
getBounds()
|
Returns :
Promise<google.maps.LatLngBounds>
|
getCenter |
getCenter()
|
Returns :
Promise<google.maps.LatLng>
|
getMapTypeId |
getMapTypeId()
|
Returns :
Promise<google.maps.MapTypeId>
|
getNativeMap |
getNativeMap()
|
Returns the native Google Maps Map instance. Be careful when using this instance directly.
Returns :
Promise<google.maps.Map>
|
getZoom |
getZoom()
|
Returns :
Promise<number>
|
panBy |
panBy(x: number, y: number)
|
Returns :
Promise<void>
|
panTo | ||||||
panTo(latLng: google.maps.LatLng | google.maps.LatLngLiteral)
|
||||||
Parameters :
Returns :
Promise<void>
|
panToBounds | |||||||||
panToBounds(latLng: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral, padding?: number | google.maps.Padding)
|
|||||||||
Parameters :
Returns :
Promise<void>
|
setCenter | ||||||
setCenter(latLng: google.maps.LatLngLiteral)
|
||||||
Parameters :
Returns :
Promise<void>
|
setMapOptions | ||||||
setMapOptions(options: google.maps.MapOptions)
|
||||||
Parameters :
Returns :
any
|
setZoom | ||||||
setZoom(zoom: number)
|
||||||
Parameters :
Returns :
Promise<void>
|
subscribeToMapEvent | ||||||
subscribeToMapEvent(eventName: N)
|
||||||
Type parameters :
|
||||||
Parameters :
Returns :
Observable<>
|
triggerMapEvent | ||||||
triggerMapEvent(eventName: string)
|
||||||
Triggers the given event name on the map instance.
Parameters :
Returns :
Promise<void>
|
Private _map |
Type : Promise<google.maps.Map>
|
Private _mapResolver |
Type : function
|