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) => Markerconfig contains defaults marker options without map property because is is passed by class. Returns instance of Marker
removeMarkers: () => voidRemoves all markers from the map
removeMarker: (marker: Marker) => voidRemoves passed marker from map.
fitBounds: (bounds?: MapLatLngBounds, padding?: MapPadding) => voidbounds- 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'] } = {}) => voidRemove bounds and set default center position and zoom from default options or params passed in options argument.
createInfoWindow: (marker: Marker, options: InfoWindowOptions) => voidCreates an info window with the given options.
removeInfoWindow: (marker: Marker) => voidRemoves info window from marker passed as argument