Library for declarative creation of Google Maps
Work in progress. The API can be changed. You use it at your own risk.
Soon. If you want to use this library now, have a look at the code. It is not complicated
createMarker: (config: MarkerOptions) => Marker
config
contains defaults marker options without map
property because is is passed by class. Returns instance of Marker
removeMarkers: () => void
Removes all markers from the map
removeMarker: (marker: Marker) => void
Removes passed marker
from map.
fitBounds: (bounds?: MapLatLngBounds, padding?: MapPadding) => void
bounds
- LatLngBounds | LatLngBoundsLiteralpadding
- number | Padding
Sets the viewport to contain the given bounds. If the bounds
argument is falsy, the bounds will fit to current markers' position.
removeBounds: (options: {
center?: MapOptions['center']
zoom?: MapOptions['zoom']
} = {}) => void
Remove bounds and set default center
position and zoom
from default options or params passed in options
argument.
createInfoWindow: (marker: Marker, options: InfoWindowOptions) => void
Creates an info window with the given options.
removeInfoWindow: (marker: Marker) => void
Removes info window from marker passed as argument