Source: https://developers.woosmap.com/products/map-api/reference/1.4/

> For clean Markdown of any page, append `.md` to the page URL.

> For a complete documentation index, see https://developers.woosmap.com/llms.txt

> TypeScript types: [`@types/woosmap.map`](https://www.npmjs.com/package/@types/woosmap.map) — [source on DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/woosmap.map)

# Map JS API v1.4



## BaseGeometry class

`woosmap.map.BaseGeometry`

This class extends `woosmap.map.MVCObject`. 

### Constructor

#### `BaseGeometry`

`BaseGeometry(options)`

**Parameters:**
- `options`: `GeometryOptions` 

  

### Methods

#### `getDraggable`

`getDraggable()`

**Parameters:** None

**Return Type** : `boolean`

Returns whether the geometry is draggable or not.

#### `getEditable`

`getEditable()`

**Parameters:** None

**Return Type** : `boolean`

Returns whether the geometry is editable or not.

#### `getMap`

`getMap()`

**Parameters:** None

**Return Type** : `(Map | null)`

Returns the current parent Map.

#### `getVisible`

`getVisible()`

**Parameters:** None

**Return Type** : `boolean`

Returns whether the geometry is visible or not.

#### `setDraggable`

`setDraggable(draggable)`

**Parameters:**
- `draggable`: `boolean` 

**Return Type** : `void`

Sets the geometry draggable.

#### `setEditable`

`setEditable(editable)`

**Parameters:**
- `editable`: `boolean` 

**Return Type** : `void`

Sets the geometry editable.

#### `setMap`

`setMap(map)`

**Parameters:**
- `map`: `Map` 

**Return Type** : `void`

Sets the map object to display on. if `map` is null, the geometry will be removed from the current `map`.

#### `setVisible`

`setVisible(visible)`

**Parameters:**
- `visible`: `boolean` 

**Return Type** : `void`

Sets the visibility of the geometry.

  

## BasePolygon class

`woosmap.map.BasePolygon`

This class extends `BaseGeometry`. 

### Constructor

#### `BasePolygon`

`BasePolygon(options)`

**Parameters:**
- `options`: `GeometryOptions` 

  

## Circle class

`woosmap.map.Circle`

This class extends `BasePolygon`. 

### Constructor

#### `Circle`

`Circle(options)`

**Parameters:**
- `options`: `CircleOptions` 

Constructs a Circle.

  

### Methods

#### `getBounds`

`getBounds()`

**Parameters:** None

**Return Type** : `LatLngBounds`

Returns the bounds for the circle geometry.

#### `getCenter`

`getCenter()`

**Parameters:** None

**Return Type** : `LatLng`

Returns the center for the circle geometry.

#### `getRadius`

`getRadius()`

**Parameters:** None

**Return Type** : `number`

Returns the radius for the circle geometry.

#### `setCenter`

`setCenter(center)`

**Parameters:**
- `center`: `LatLng` 

**Return Type** : `void`

Sets the center for the circle.

#### `setRadius`

`setRadius(radius)`

**Parameters:**
- `radius`: `number` 

**Return Type** : `void`

Sets the radius for the circle.

#### `setOptions`

`setOptions(options)`

**Parameters:**
- `options`: `CircleOptions` 

**Return Type** : `void`

Sets the options for the circle.

  

## Data class

`woosmap.map.Data`

This class extends `woosmap.map.MVCObject`. 

A layer for displaying geospatial data. Points can be displayed.

### Constructor

#### `Data`

`Data()`

**Parameters:** None

Creates an empty collection.

  

### Methods

#### `add`

`add(feature)`

**Parameters:**
- `feature`: `Feature` 

**Return Type** : `void`

Adds the feature passed as parameter.

#### `remove`

`remove(feature)`

**Parameters:**
- `feature`: `Feature` 

**Return Type** : `void`

Remove the feature passed as parameter.

#### `addGeoJson`

`addGeoJson(geojson, options?)`

**Parameters:**
- `geojson`: `GeoJSONFeatureCollection` 
- `options`: `{idPropertyName: string}` 

**Return Type** : `void`

Adds GeoJSON features to the collection. Give this method a parsed JSON. The imported features are returned. Throws an exception if the GeoJSON could not be imported.

#### `toGeoJson`

`toGeoJson(callback)`

**Parameters:**
- `callback`: `(geojson: GeoJSONFeatureCollection) => void` 

**Return Type** : `void`

Exports the features in the collection to a GeoJSON object.

#### `contains`

`contains(feature)`

**Parameters:**
- `feature`: `Feature` 

**Return Type** : `boolean`

Checks whether the given feature is in the collection.

#### `forEach`

`forEach(callback)`

**Parameters:**
- `callback`: `(feature: Feature) => void` 

**Return Type** : `void`

Repeatedly invokes the given function, passing a feature in the collection to the function on each invocation. The order of iteration through the features is undefined.

#### `getFeatureById`

`getFeatureById(id)`

**Parameters:**
- `id`: `string` 

**Return Type** : `(Feature | null)`

Returns the feature matching the id.

#### `getMap`

`getMap()`

**Parameters:** None

**Return Type** : `(Map | null)`

Returns the map on which the features are displayed.

#### `setMap`

`setMap(map)`

**Parameters:**
- `map`: `Map` 

**Return Type** : `void`

Renders the features on the specified map. If map is set to null, the features will be removed from the map.

#### `setStyle`

`setStyle(style)`

**Parameters:**
- `style`: `StyleFunction` 

**Return Type** : `void`

Sets the style for all features in the collection. Styles specified on a per-feature basis via `overrideStyle()` continue to apply. Pass either an object with the desired style options, or a function that computes the style for each feature. The function will be called every time a feature’s properties are updated.

#### `getStyle`

`getStyle()`

**Parameters:** None

**Return Type** : `StyleFunction`

Gets the style for all features in the collection.

#### `overrideStyle`

`overrideStyle(feature, style)`

**Parameters:**
- `feature`: `Feature` 
- `style`: `StyleOptions` 

**Return Type** : `void`

Changes the style of a feature. These changes are applied on top of the style specified by `setStyle()`. Style properties set to null revert to the value specified via `setStyle()`.

#### `revertStyle`

`revertStyle(feature?)`

**Parameters:**
- `feature`: `(Feature | null)` 

**Return Type** : `void`

Removes the effect of previous `overrideStyle()` calls. The style of the given feature reverts to the style specified by `setStyle()`. If no feature is given, all features have their style reverted.

#### `loadGeoJson`

`loadGeoJson(url, options?, callback?)`

**Parameters:**
- `url`: `string` 
- `options`: `{idPropertyName: string}` 
- `callback`: `(data: Feature[]) => void` 

**Return Type** : `void`

Loads GeoJSON features to the collection from an url. If a callback is provided it will be called with the imported features.

  

### Events

#### `removefeature`

This event is triggered when a feature was removed.

#### `addfeature`

This event is triggered when a feature was added.

#### `click`

This event is triggered when a feature is clicked.

#### `contextmenu`

This event is triggered when a feature is right-clicked.

#### `dblclick`

This event is triggered when a feature is double clicked.

#### `mousedown`

#### `mouseup`

#### `mouseout`

This event is triggered when the mouse moves out of a feature.

#### `mouseover`

This event is triggered when a feature was hovered

#### `mouseenter`

This event is triggered when a feature is hovered.

  

## GeometryCollection class

`woosmap.map.Data.GeometryCollection`

This class implements `Geometry<"GeometryCollection", any>`. 

### Constructor

#### `GeometryCollection`

`GeometryCollection(elements)`

**Parameters:**
- `elements`: `GeometryArray` 

Constructs a geometry collection from an array of geometries.

  

### Methods

#### `getAt`

`getAt(n)`

**Parameters:**
- `n`: `number` 

**Return Type** : `GeometryCollectionElement`

Returns the n-th Geometry of the GeometryCollection.

#### `getArray`

`getArray()`

**Parameters:** None

**Return Type** : `GeometryArray`

#### `getLength`

`getLength()`

**Parameters:** None

**Return Type** : `number`

#### `forEachLatLng`

`forEachLatLng(callback)`

**Parameters:**
- `callback`: `(point: LatLng) => void` 

**Return Type** : `void`

#### `getType`

`getType()`

**Parameters:** None

**Return Type** : `"GeometryCollection"`

Returns `"GeometryCollection"`.

  

## LineString class

`woosmap.map.Data.LineString`

This class implements `Geometry<"LineString", Coordinates[]>`. 

### Constructor

#### `LineString`

`LineString(points)`

**Parameters:**
- `points`: `LatLng[]` 

  

### Methods

#### `getAt`

`getAt(n)`

**Parameters:**
- `n`: `number` 

**Return Type** : `LatLng`

Returns the n-th Point (as LatLng) of the LineString.

#### `getArray`

`getArray()`

**Parameters:** None

**Return Type** : `LatLng[]`

Returns the points of the linestring as an array of LatLng.

#### `getLength`

`getLength()`

**Parameters:** None

**Return Type** : `number`

Returns the count of points in the linestring.

#### `forEachLatLng`

`forEachLatLng(callback)`

**Parameters:**
- `callback`: `(point: LatLng) => void` 

**Return Type** : `void`

#### `getType`

`getType()`

**Parameters:** None

**Return Type** : `"LineString"`

  

## LinearRing class

`woosmap.map.Data.LinearRing`

This class extends `LineString`. 

### Constructor

#### `LinearRing`

`LinearRing(points)`

**Parameters:**
- `points`: `LatLng[]` 

Constructs a linear ring.

  

## MultiLineString class

`woosmap.map.Data.MultiLineString`

This class implements `Geometry<"MultiLineString", Coordinates[][]>`. 

### Constructor

#### `MultiLineString`

`MultiLineString(linestrings)`

**Parameters:**
- `linestrings`: `LineString[]` 

Constructs a MultiLineString. A MultiLineString is a collection of LineString.

  

### Methods

#### `getAt`

`getAt(n)`

**Parameters:**
- `n`: `number` 

**Return Type** : `LineString`

Returns the n-th LineString of the MultiLineString.

#### `getArray`

`getArray()`

**Parameters:** None

**Return Type** : `LineString[]`

#### `forEachLatLng`

`forEachLatLng(callback)`

**Parameters:**
- `callback`: `(point: LatLng) => void` 

**Return Type** : `void`

#### `getType`

`getType()`

**Parameters:** None

**Return Type** : `"MultiLineString"`

Returns `"MultiLineString"`.

  

## MultiPoint class

`woosmap.map.Data.MultiPoint`

This class implements `Geometry<"MultiPoint", Coordinates[]>`. 

### Constructor

#### `MultiPoint`

`MultiPoint(points)`

**Parameters:**
- `points`: `LatLng[]` 

Constructs a Multipoint geometry.

  

### Methods

#### `getAt`

`getAt(n)`

**Parameters:**
- `n`: `number` 

**Return Type** : `LatLng`

Returns n-th Point of the MultiPoint.

#### `getArray`

`getArray()`

**Parameters:** None

**Return Type** : `LatLng[]`

Return the array of points

#### `getLength`

`getLength()`

**Parameters:** None

**Return Type** : `number`

Returns the length of the multipoint.

#### `forEachLatLng`

`forEachLatLng(callback)`

**Parameters:**
- `callback`: `(point: LatLng) => void` 

**Return Type** : `void`

For each point calls the callback.

#### `getType`

`getType()`

**Parameters:** None

**Return Type** : `"MultiPoint"`

Returns `"MultiPoint"`.

  

## MultiPolygon class

`woosmap.map.Data.MultiPolygon`

This class implements `Geometry<"MultiPolygon", Coordinates[][][]>`. 

### Constructor

#### `MultiPolygon`

`MultiPolygon(elements)`

**Parameters:**
- `elements`: `Polygon[]` 

Constructs a MultiPolygon geometry. A MultiPolygon is a set of Polygons.

  

### Methods

#### `getAt`

`getAt(n)`

**Parameters:**
- `n`: `number` 

**Return Type** : `Polygon`

Returns the n-th polygon of the MultiPolygon.

#### `getArray`

`getArray()`

**Parameters:** None

**Return Type** : `Polygon[]`

Returns the array of Polygons that makes the MultiPolygon.

#### `getLength`

`getLength()`

**Parameters:** None

**Return Type** : `number`

Return the count of Polygon in the MultiPolygon.

#### `forEachLatLng`

`forEachLatLng(callback)`

**Parameters:**
- `callback`: `(point: LatLng) => void` 

**Return Type** : `void`

#### `getType`

`getType()`

**Parameters:** None

**Return Type** : `"MultiPolygon"`

Returns `"MultiPolygon"`.

  

## Point class

`woosmap.map.Data.Point`

This class implements `Geometry<"Point", Coordinates>`. 

### Constructor

#### `Point`

`Point(point)`

**Parameters:**
- `point`: `LatLng` the geometry

Constructs a Point geometry

  

### Methods

#### `get`

`get()`

**Parameters:** None

**Return Type** : `LatLng`

Returns the point geometry

#### `forEachLatLng`

`forEachLatLng(callback)`

**Parameters:**
- `callback`: `(point: LatLng) => void` 

**Return Type** : `void`

#### `getType`

`getType()`

**Parameters:** None

**Return Type** : `"Point"`

Returns `"Point"`.

  

## Polygon class

`woosmap.map.Data.Polygon`

This class implements `Geometry<"Polygon", Coordinates[][]>`. 

### Constructor

#### `Polygon`

`Polygon(elements)`

**Parameters:**
- `elements`: `LinearRing[]` 

Constructs a Polygon, using a set of linear ring.

  

### Methods

#### `getAt`

`getAt(n)`

**Parameters:**
- `n`: `number` 

**Return Type** : `LinearRing`

Returns the n-th LinearRing of the Polygon.

#### `getArray`

`getArray()`

**Parameters:** None

**Return Type** : `LinearRing[]`

Returns the array of LinearRing that composes the Polygon.

#### `getLength`

`getLength()`

**Parameters:** None

**Return Type** : `number`

Returns the count of LinearRings that composes the Polygon.

#### `forEachLatLng`

`forEachLatLng(callback)`

**Parameters:**
- `callback`: `(point: LatLng) => void` 

**Return Type** : `void`

For each LinearRing call `callback`.

#### `getType`

`getType()`

**Parameters:** None

**Return Type** : `"Polygon"`

Returns `"Polygon"`.

  

## DatasetsOverlay class

`woosmap.map.DatasetsOverlay`

### Constructor

#### `DatasetsOverlay`

`DatasetsOverlay(datasetId, options?)`

**Parameters:**
- `datasetId`: `string` 
- `options`: `DatasetsOverlayOptions` 

  

### Methods

#### `setMap`

`setMap(map)`

**Parameters:**
- `map`: `Map` 

**Return Type** : `void`

Adds or remove the overlay from the map.

  

## DatasetsService class

`woosmap.map.DatasetsService`

### Constructor

#### `DatasetsService`

`DatasetsService(datasetId)`

**Parameters:**
- `datasetId`: `string` 

  

### Methods

#### `intersects`

`intersects(request, pagination?)`

**Parameters:**
- `request`: `DatasetsSearchWithInputGeometryRequest` The geometry to intersect with.
- `pagination`: `DatasetsPaginationRequest` 

**Return Type** : `Promise<DatasetsSearchResponse>`

Returns features intersecting with the geometry, buffer is applied if defined.

#### `within`

`within(request, pagination?)`

**Parameters:**
- `request`: `DatasetsSearchWithPolygonGeometryRequest` The geometry to intersect with. Within operation only supports Polygons.
- `pagination`: `DatasetsPaginationRequest` 

**Return Type** : `Promise<DatasetsSearchResponse>`

Returns features within by the geometry, buffer is applied if defined.

#### `contains`

`contains(request, pagination?)`

**Parameters:**
- `request`: `DatasetsSearchWithInputGeometryRequest` 
- `pagination`: `DatasetsPaginationRequest` 

**Return Type** : `Promise<DatasetsSearchResponse>`

Returns feature containing the geometry.

#### `search`

`search(request, pagination?)`

**Parameters:**
- `request`: `DatasetsSearchRequest` 
- `pagination`: `DatasetsPaginationRequest` 

**Return Type** : `Promise<DatasetsSearchResponse>`

Searches for features matching the query.

#### `getFeature`

`getFeature(featureId)`

**Parameters:**
- `featureId`: `string` 

**Return Type** : `Promise<DatasetsFeature>`

Get the full feature, with its geometry.

  

## DirectionsRenderer class

`woosmap.map.DirectionsRenderer`

This class extends `MVCObject`. 

### Constructor

#### `DirectionsRenderer`

`DirectionsRenderer(options)`

**Parameters:**
- `options`: `DirectionsRendererOptions` 

  

### Methods

#### `setMap`

`setMap(map)`

**Parameters:**
- `map`: `Map` 

**Return Type** : `void`

Sets the map where to render the directions.

#### `setDirections`

`setDirections(directions)`

**Parameters:**
- `directions`: `DirectionResult` 

**Return Type** : `void`

Sets the directions result to render.

#### `setRouteIndex`

`setRouteIndex(routeIndex)`

**Parameters:**
- `routeIndex`: `number` 

**Return Type** : `void`

Sets the route index in the DirectionResult object to render. By default the first route (0) will be rendered.

  

### Events

#### `routeIndex_changed`

This event is triggered when the routeIndex changes.

  

## DirectionsService class

`woosmap.map.DirectionsService`

### Constructor

#### `DirectionsService`

`DirectionsService()`

**Parameters:** None

  

### Methods

#### `route`

`route(request, callback)`

**Parameters:**
- `request`: `DirectionRequest` 
- `callback`: `(result: DirectionResult, status: string) => any` The callback to call

**Return Type** : `void`

Issue a directions search request.

  

## DistanceService class

`woosmap.map.DistanceService`

A service for computing distances and durations between multiple origins and destinations and retrieving isochrone destinations.

### Constructor

#### `DistanceService`

`DistanceService()`

**Parameters:** None

A service for computing distances and durations between multiple origins and destinations and retrieving isochrone destinations.

  

### Methods

#### `getDistanceMatrix`

`getDistanceMatrix(request)`

**Parameters:**
- `request`: `DistanceMatrixRequest` The distance matrix request.

**Return Type** : `Promise<DistanceMatrixResponse>`

Retrieves distances and durations for the supplied matrix request.

#### `getDistanceIsochrone`

`getDistanceIsochrone(request)`

**Parameters:**
- `request`: `DistanceIsochroneRequest` The distance isochrone request.

**Return Type** : `Promise<DistanceIsochroneResponse>`

Find all destinations that can be reached in a specific amount of time or a maximum travel distance based on the supplied isochrone request.

  

## Drawing class

`woosmap.map.Drawing`

This class extends `MapboxDraw`. 

Add drawing capabilities to Woosmap Map. You can call methods of a Drawing instance and add custom modes as you would with a MapboxDraw instance. This Drawing library is not loaded by default when you load the Map JS API but must be explicitly specified through use of a `libraries` parameter in SDK URL.

#### Add the Drawing Lib

```html
<script async src="https://sdk.woosmap.com/map/map.js?key=YOUR_API_KEY&libraries=drawing&callback=initMap"></script>
```

#### Create a Draw control and add it to the map

```javascript
var draw = new woosmap.map.Drawing(drawOptions);
draw.addControl(map);
```

### Constructor

#### `Drawing`

`Drawing(options?)`

**Parameters:**
- `options`: `MapboxDraw.MapboxDrawOptions` 

  

### Methods

#### `addControl`

`addControl(map, position?)`

**Parameters:**
- `map`: `Map` The map object to add control to.
- `position`: `ControlPositionType` Position on the map to which the control will be added. Defaults to ‘top-right’.

**Return Type** : `void`

Adds Drawing Control to a Map.

#### `removeControl`

`removeControl()`

**Parameters:** None

**Return Type** : `void`

Removes Drawing Control to its attached Map.

#### `addListener`

`addListener(event, handler)`

**Parameters:**
- `event`: `MapboxDraw.DrawEventType` 
- `handler`: `Function` The function to call when event is triggered

**Return Type** : `void`

Register Drawing Events

  

## ImageMapType class

`woosmap.map.ImageMapType`

This class implements `MapType`. 

ImageMapType defines tiled image layer that can be added to the map. It supports both `xyz` and `tms` tile schemes.

#### Adds a tileLayer with .5 opacity.

```javascript
const tiledLayer = new woosmap.map.ImageMapType({
  url: "https://tile.openstreetmap.org/{z}/{x}/{y}.png",
  scheme: "xyz",
  maxZoom: 22,
  minZoom: 0,
  opacity: 0.5,
});
map.overlayMapTypes.insertAt(0, tiledLayer);
```

### Constructor

#### `ImageMapType`

`ImageMapType(opts)`

**Parameters:**
- `opts`: `ImageMapTypeOptions` 

ImageMapType defines tiled image layer that can be added to the map. It supports both `xyz` and `tms` tile schemes.

  

### Properties

#### `maxZoom`

**Type** : ` number`

#### `minZoom`

**Type** : ` number`
  

### Methods

#### `getTile`

`getTile(tileCoord, zoom, ownerDocument)`

**Parameters:**
- `tileCoord`: `Point` 
- `zoom`: `number` 
- `ownerDocument`: `null` 

**Return Type** : `(Element | null)`

#### `releaseTile`

`releaseTile(tile)`

**Parameters:**
- `tile`: `Element` 

**Return Type** : `void`

  

## InfoWindow class

`woosmap.map.InfoWindow`

This class extends `woosmap.map.MVCObject`. 

### Constructor

#### `InfoWindow`

`InfoWindow(options)`

**Parameters:**
- `options`: `InfoWindowOptions` 

  

### Methods

#### `open`

`open(map, anchor)`

**Parameters:**
- `map`: `Map` 
- `anchor`: `Marker` 

**Return Type** : `void`

Opens the info window.

#### `close`

`close()`

**Parameters:** None

**Return Type** : `void`

Closes this InfoWindow by removing it from the DOM structure.

#### `setContent`

`setContent(content)`

**Parameters:**
- `content`: `string` 

**Return Type** : `void`

Sets the info window content

#### `setPosition`

`setPosition(positionOrMarker)`

**Parameters:**
- `positionOrMarker`: `Marker` 

**Return Type** : `void`

Sets the anchor

#### `setOffset`

`setOffset(offset)`

**Parameters:**
- `offset`: `Point` 

**Return Type** : `void`

Sets the offset

#### `setMarker`

`setMarker(marker?)`

**Parameters:**
- `marker`: `(Marker | null)` 

**Return Type** : `void`

Sets the marker

#### `setMap`

`setMap(map)`

**Parameters:**
- `map`: `Map` 

**Return Type** : `void`

Sets the info window map.

#### `getMap`

`getMap()`

**Parameters:** None

**Return Type** : `(Map | null)`

Gets the current map bound to the

  

## LatLng class

`woosmap.map.LatLng`

### Constructor

#### `LatLng`

`LatLng(lat, lng?)`

**Parameters:**
- `lat`: `LatLng` 
- `lng`: `number` 

Creates a `LatLng` object representing a geographic point. Latitude is specified in degrees within the range [-90, 90]. Longitude is specified in degrees within the range [-180, 180]. Set `noWrap` to `true` to enable values outside of this range. Note the ordering of latitude and longitude.

  

### Properties

#### `lat`

**Type** : ` () => number`

Returns the latitude in degrees.

#### `lng`

**Type** : ` () => number`

Returns the longitude in degrees.

  

### Methods

#### `equals`

`equals(other)`

**Parameters:**
- `other`: `LatLng` 

**Return Type** : `boolean`

Comparison function.

#### `toJSON`

`toJSON()`

**Parameters:** None

**Return Type** : `LatLngLiteral`

Converts to JSON representation. This function is intended to be used via `JSON.stringify`.

#### `toString`

`toString()`

**Parameters:** None

**Return Type** : `string`

  

## LatLngBounds class

`woosmap.map.LatLngBounds`

### Constructor

#### `LatLngBounds`

`LatLngBounds(northEast?, southWest?)`

**Parameters:**
- `northEast`: `(LatLng` The north east coordinate.
- `southWest`: `(LatLng` The south west coordinate.

Creates a LatLngBounds object

  

### Methods

#### `extend`

`extend(latlng)`

**Parameters:**
- `latlng`: `LatLng` 

**Return Type** : `void`

Extends the current bounds with point.

#### `contains`

`contains(latlng)`

**Parameters:**
- `latlng`: `LatLng` 

**Return Type** : `boolean`

Checks if current bounds contain latlng.

#### `intersects`

`intersects(other)`

**Parameters:**
- `other`: `LatLngBounds` 

**Return Type** : `boolean`

Checks if bounds are intersecting with other.

#### `union`

`union(other)`

**Parameters:**
- `other`: `LatLngBounds` 

**Return Type** : `void`

Computes the union of this bounds and other.

#### `getNorthEast`

`getNorthEast()`

**Parameters:** None

**Return Type** : `LatLng`

Returns the north-east corner of these bounds.

#### `getSouthWest`

`getSouthWest()`

**Parameters:** None

**Return Type** : `LatLng`

Returns the south-west corner of this bounds.

#### `getCenter`

`getCenter()`

**Parameters:** None

**Return Type** : `LatLng`

Computes the center of the latlng bounds.

#### `isEmpty`

`isEmpty()`

**Parameters:** None

**Return Type** : `boolean`

Checks if the current bounds are empty.

  

## LocalitiesService class

`woosmap.map.LocalitiesService`

Contains methods related to retrieving autocomplete predictions, geocoding for localities and retrieving details

### Constructor

#### `LocalitiesService`

`LocalitiesService()`

**Parameters:** None

Contains methods related to retrieving autocomplete predictions, geocoding for localities and retrieving details

  

### Properties

#### `_sessionId`

**Type** : ` string`

To better track autocomplete sessions and get more accurate and performant results, provide a common uuid to all autocomplete session requests and the details request. sessionId must be reset when autocomplete input is emptied and when a details is successful.

  

### Methods

#### `autocomplete`

`autocomplete(request)`

**Parameters:**
- `request`: `LocalitiesAutocompleteRequest` The localities autocompletion request.

**Return Type** : `Promise<LocalitiesAutocompleteResponse>`

Retrieves localities autocomplete predictions based on the supplied autocomplete request.

#### `geocode`

`geocode(request)`

**Parameters:**
- `request`: `LocalitiesGeocodeRequest` The localities geocode request.

**Return Type** : `Promise<LocalitiesGeocodeResponse>`

Retrieves localities results based on the supplied geocode request.

#### `getDetails`

`getDetails(request)`

**Parameters:**
- `request`: `LocalitiesDetailsRequest` The localities details request.

**Return Type** : `Promise<LocalitiesDetailsResponse>`

Retrieves details about the locality identified by the given `public_id`

#### `nearby`

`nearby(request)`

**Parameters:**
- `request`: `LocalitiesNearbyRequest` The localities nearby request.

**Return Type** : `Promise<LocalitiesNearbyResponse>`

Retrieves localities results based on the nearby request.

  

## MVCArray class

`woosmap.map.MVCArray`

This class extends `woosmap.map.MVCObject`. 

### Constructor

#### `MVCArray`

`MVCArray(array?)`

**Parameters:**
- `array`: `T[]` 

  

### Methods

#### `clear`

`clear()`

**Parameters:** None

**Return Type** : `void`

Removes all elements from the array.

#### `forEach`

`forEach(callback)`

**Parameters:**
- `callback`: `(element: T, index: number) => void` 

**Return Type** : `void`

Iterate over each element, calling the provided callback. The callback is called for each element like: callback(element, index).

#### `getArray`

`getArray()`

**Parameters:** None

**Return Type** : `T[]`

#### `getAt`

`getAt(i)`

**Parameters:**
- `i`: `number` index

**Return Type** : `T`

Get the element at the specified index.

#### `getLength`

`getLength()`

**Parameters:** None

**Return Type** : `number`

Get the number of elements in this array.

#### `insertAt`

`insertAt(i, elem)`

**Parameters:**
- `i`: `number` 
- `elem`: `T` 

**Return Type** : `void`

Inserts an element at the specified index.

#### `pop`

`pop()`

**Parameters:** None

**Return Type** : `T`

Removes the last element of the array and returns that element.

#### `push`

`push(elem)`

**Parameters:**
- `elem`: `T` 

**Return Type** : `number`

Adds one element to the end of the array and returns the new length of the array.

#### `removeAt`

`removeAt(i)`

**Parameters:**
- `i`: `number` 

**Return Type** : `T`

Removes an element from the specified index.

#### `setAt`

`setAt(i, elem)`

**Parameters:**
- `i`: `number` 
- `elem`: `T` 

**Return Type** : `void`

Sets an element at the specified index.

#### `indexOf`

`indexOf(elem)`

**Parameters:**
- `elem`: `T` 

**Return Type** : `number`

Returns the index of a given element.

  

## MVCObject class

`woosmap.map.MVCObject`

Constructor for MVCObject.

### Constructor

#### `MVCObject`

`MVCObject()`

**Parameters:** None

Constructor for MVCObject.

  

### Methods

#### `bindTo`

`bindTo(key, target, targetKey?, notify?)`

**Parameters:**
- `key`: `string` the property to be bound
- `target`: `object` the object to bind to
- `targetKey`: `string` optional the name of the property on the target, if different from the name of the property on the observer
- `notify`: `boolean` optional do not call \_changed callback upon binding

**Return Type** : `void`

Binds the property identified by ‘key’ to the specified target.

#### `isPropertyBound`

`isPropertyBound(key)`

**Parameters:**
- `key`: `string` the property to set

**Return Type** : `boolean`

Is this property a complex object - is it bound as either observer or target

#### `get`

`get(key)`

**Parameters:**
- `key`: `string` the property to fetch

**Return Type** : `mixed`

Returns the value of the property specified by `key`

#### `set`

`set(key, value, forceCallback?)`

**Parameters:**
- `key`: `string` the name of the property to set
- `value`: `mixed` the new value of the property identified by `key`
- `forceCallback`: `boolean` optional call callbacks, regardless of whether the value has changed or not.

**Return Type** : `void`

Sets `value` to `key` on `this`.

#### `setOptions`

`setOptions(keyValuePairs)`

**Parameters:**
- `keyValuePairs`: `object` an object containing `key` =\> `value` of properties to change

**Return Type** : `void`

Set all the values of the properties contained in `keyValuePairs`

#### `unbind`

`unbind(key)`

**Parameters:**
- `key`: `string` 

**Return Type** : `void`

Un-bind the property identified by `key` from its current target

#### `unbindAll`

`unbindAll()`

**Parameters:** None

**Return Type** : `void`

Unbind all bound properties on this object

#### `addListener`

`addListener(eventName, handler)`

**Parameters:**
- `eventName`: `String` 
- `handler`: `Function` 

**Return Type** : `MapEventListener`

Adds a listener for eventName.

  

## Map class

`woosmap.map.Map`

This class extends `woosmap.map.MVCObject`. 

### Constructor

#### `Map`

`Map(mapDiv, options?)`

**Parameters:**
- `mapDiv`: `HTMLElement` HTMLElement | string
- `options`: `MapOptions` MapOptions

Creates a new map inside the given HTML container, which is typically a `DIV` element.

  

### Properties

#### `data`

**Type** : ` Data`

An instance of `Data`, bound to the map. Add features to this `Data` object to conveniently display them on this map.

#### `overlayMapTypes`

**Type** : ` MVCArray<MapType>`

Additional map types to overlay.

  

### Methods

#### `remove`

`remove()`

**Parameters:** None

**Return Type** : `void`

Clean up and release all internal resources associated with this map.This includes DOM elements, event bindings, web workers, and WebGL resources.Use this method when you are done using the map and wish to ensure that it no longer consumes browser resources. Afterwards, you must not call any other methods on the map.

#### `fitBounds`

`fitBounds(bounds, padding?, animate?)`

**Parameters:**
- `bounds`: `LatLngBounds` 
- `padding`: `Padding` 
- `animate`: `boolean` 

**Return Type** : `void`

Sets the viewport to contain the given bounds.

#### `getBounds`

`getBounds(padding?)`

**Parameters:**
- `padding`: `Padding` 

**Return Type** : `LatLngBounds`

Returns the lat/lng bounds of the current viewport. Optionally takes a padding parameter.

#### `getCenter`

`getCenter()`

**Parameters:** None

**Return Type** : `LatLng`

Returns the position displayed at the center of the map.

#### `getDiv`

`getDiv()`

**Parameters:** None

**Return Type** : `HTMLElement`

#### `getHeading`

`getHeading()`

**Parameters:** None

**Return Type** : `number`

Returns the compass heading. The heading value is measured in degrees (clockwise) from cardinal direction North.

#### `getTilt`

`getTilt()`

**Parameters:** None

**Return Type** : `number`

Returns the current angle of incidence of the map, in degrees from the viewport plane to the map plane

#### `getZoom`

`getZoom()`

**Parameters:** None

**Return Type** : `number`

Returns the current angle of incidence of the map, in degrees from the viewport plane to the map plane.

#### `panBy`

`panBy(x, y)`

**Parameters:**
- `x`: `number` Number of pixels to move the map in the x direction.
- `y`: `number` Number of pixels to move the map in the y direction.

**Return Type** : `void`

Changes the center of the map by the given distance in pixels

#### `panTo`

`panTo(latLng, padding?)`

**Parameters:**
- `latLng`: `LatLng` 
- `padding`: `Padding` 

**Return Type** : `void`

Changes the center of the map to the given LatLng.

#### `flyTo`

`flyTo(options)`

**Parameters:**
- `options`: `FlyToOptions` 

**Return Type** : `void`

Changes any combination of center, zoom, bearing, and pitch, animating the transition along a curve that evokes flight.

#### `panToBounds`

`panToBounds(latLngBounds, padding)`

**Parameters:**
- `latLngBounds`: `LatLngBounds` 
- `padding`: `number` 

**Return Type** : `void`

Pans the map by the minimum amount necessary to contain the given LatLngBounds. It makes no guarantee where on the map the bounds will be, except that the map will be panned to show as much of the bounds as possible inside `{currentMapSizeInPx} - {padding}.`

#### `setCenter`

`setCenter(center, padding?)`

**Parameters:**
- `center`: `LatLng` 
- `padding`: `Padding` 

**Return Type** : `void`

Sets the map center

#### `setHeading`

`setHeading(heading)`

**Parameters:**
- `heading`: `number` 

**Return Type** : `void`

Sets the compass heading for map measured in degrees from cardinal direction North.

#### `setTilt`

`setTilt(tilt)`

**Parameters:**
- `tilt`: `number` 

**Return Type** : `void`

#### `setZoom`

`setZoom(zoom)`

**Parameters:**
- `zoom`: `number` 

**Return Type** : `void`

#### `getMapTypeId`

`getMapTypeId()`

**Parameters:** None

**Return Type** : `string`

Returns the current map type id.

#### `setMapTypeId`

`setMapTypeId(mapTypeId)`

**Parameters:**
- `mapTypeId`: `string` The map type id to set.

**Return Type** : `void`

Sets the map type id.

  

### Events

#### `bounds_changed`

This event is fired when the viewport bounds have changed.

#### `center_changed`

This event is fired when the map center property changes.

#### `click`

This event is fired when the user clicks on the map.

#### `dblclick`

This event is fired when the user double-clicks on the map.

#### `drag`

This event is repeatedly fired while the user drags the map.

#### `dragend`

This event is fired when the user stops dragging the map.

#### `dragstart`

This event is fired when the user starts dragging the map.

#### `idle`

This event is fired when the map becomes idle after panning or zooming.

#### `mousemove`

This event is fired whenever the user’s mouse moves over the map container.

#### `mouseout`

This event is fired when the user’s mouse exits the map container.

#### `mouseover`

This event is fired when the user’s mouse enters the map container.

#### `rightclick`

This event is fired when the DOM contextmenu event is fired on the map container.

#### `zoom_changed`

This event is fired when the map zoom property changes.

#### `map_poi_click`

This event is fired when a Point of Interest is clicked on the map.

  

## Marker class

`woosmap.map.Marker`

This class extends `woosmap.map.MVCObject`. 

### Constructor

#### `Marker`

`Marker(options?)`

**Parameters:**
- `options`: `MarkerOptions` 

Constructs a Marker

  

### Properties

#### `cursor`

**Type** : ` string`

#### `map`

**Type** : ` Map`

#### `position`

**Type** : ` LatLng`
  

### Methods

#### `setIcon`

`setIcon(icon)`

**Parameters:**
- `icon`: `Icon` 

**Return Type** : `void`

#### `setMap`

`setMap(map?)`

**Parameters:**
- `map`: `(Map | null)` 

**Return Type** : `void`

#### `setOpacity`

`setOpacity(opacity)`

**Parameters:**
- `opacity`: `number` 

**Return Type** : `void`

Sets the marker opacity.

#### `getOpacity`

`getOpacity()`

**Parameters:** None

**Return Type** : `number`

Gets the marker opacity.

#### `getPosition`

`getPosition()`

**Parameters:** None

**Return Type** : `LatLng`

Get the marker’s geographical location.The longitude of the result may differ by a multiple of 360 degrees from the longitude previously set by `setLngLat` because `Marker` wraps the anchor longitude across copies of the world to keep the marker on screen.

#### `setPosition`

`setPosition(position, animate?, options?)`

**Parameters:**
- `position`: `LatLng` 
- `animate`: `boolean` Specifies whether to apply smooth transition between two positions. Animation is disabled by default.
- `options`: `MarkerAnimateOptions` The animation options to apply.

**Return Type** : `void`

Sets the position of the marker

#### `getOffset`

`getOffset()`

**Parameters:** None

**Return Type** : `Point`

Get the marker’s offset.

#### `setOffset`

`setOffset(offset)`

**Parameters:**
- `offset`: `Point` The offset in pixels as a {@link PointLike} object to apply relative to the element’s center. Negatives indicate left and up.

**Return Type** : `Marker`

Sets the offset of the marker

#### `setDraggable`

`setDraggable(shouldBeDraggable)`

**Parameters:**
- `shouldBeDraggable`: `boolean` Turns drag functionality on/off

**Return Type** : `Marker`

Sets the `draggable` property and functionality of the marker

#### `getDraggable`

`getDraggable()`

**Parameters:** None

**Return Type** : `boolean`

Returns true if the marker can be dragged

#### `setRotation`

`setRotation(rotation)`

**Parameters:**
- `rotation`: `number` The rotation angle of the marker (clockwise, in degrees), relative to its respective {@link Marker#rotationAlignment} setting.

**Return Type** : `Marker`

Sets the `rotation` property of the marker.

#### `getRotation`

`getRotation()`

**Parameters:** None

**Return Type** : `number`

Returns the current rotation angle of the marker (in degrees).

#### `setRotationAlignment`

`setRotationAlignment(alignment)`

**Parameters:**
- `alignment`: `string` Sets the `rotationAlignment` property of the marker.

**Return Type** : `Marker`

Sets the `rotationAlignment` property of the marker.

#### `getRotationAlignment`

`getRotationAlignment()`

**Parameters:** None

**Return Type** : `string`

Returns the current `rotationAlignment` property of the marker.

#### `setPitchAlignment`

`setPitchAlignment(alignment?)`

**Parameters:**
- `alignment`: `string` Sets the `pitchAlignment` property of the marker. If alignment is ‘auto’, it will automatically match `rotationAlignment`.

**Return Type** : `Marker`

Sets the `pitchAlignment` property of the marker.

#### `getPitchAlignment`

`getPitchAlignment()`

**Parameters:** None

**Return Type** : `string`

Returns the current `pitchAlignment` property of the marker.

  

### Events

#### `click`

This event is fired when the marker was clicked.

#### `mouseover`

This event is fired when the mouse enters the area of the marker.

#### `mouseout`

This event is fired when the mouse leaves the area of the marker.

#### `clickable_changed`

This event is fired when markers `clickable` property changes.

#### `cursor_changed`

This event is fired when markers `cursor` property changes.

#### `icon_changed`

This event is fired when markers `icon` property changes.

#### `position_changed`

This event is fired when markers `position` property changes.

#### `dragstart`

Fired when dragging starts

#### `drag`

Fired while dragging

#### `dragend`

Fired when the marker is finished being dragged

#### `draggable_changed`

This event is fired when markers `draggable` property changes.

#### `visible_changed`

This event is fired when markers `visible` property changes.

#### `zIndex_changed`

This event is fired when markers `zIndex` property changes.

  

## OverlayView class

`woosmap.map.OverlayView`

This class allows you to create custom overlay objects on the map. To use this class, set your overlay’s class to extend from `OverlayView`. You’ll need to implement three methods: `onAdd()`, `draw()`, and `onRemove()`.

#### Example

```javascript
class MyOverlay extends woosmap.map.OverlayView {
 constructor({ map }) {
      super();
      this.setMap(map);
 }
 onAdd(){}
 draw(){}
 onRemove(){}
}
```

### Constructor

#### `OverlayView`

`OverlayView()`

**Parameters:** None

This class allows you to create custom overlay objects on the map. To use this class, set your overlay’s class to extend from `OverlayView`. You’ll need to implement three methods: `onAdd()`, `draw()`, and `onRemove()`.

  

### Methods

#### `draw`

`draw()`

**Parameters:** None

**Return Type** : `void`

This method should be implemented to draw or update the overlay. Use the position from `projection.fromLatLngToDivPixel()` to correctly position the overlay relative to the `MapPanes`. This method is called after `onAdd()`, and whenever the zoom or center of the map changes. Avoid performing computationally expensive operations in this method.

#### `getMap`

`getMap()`

**Parameters:** None

**Return Type** : `(Map | null)`

Retrieves the map associated with this overlay.

#### `getPanes`

`getPanes()`

**Parameters:** None

**Return Type** : `(MapPanes | null)`

Retrieves the panes in which this `OverlayView` can be rendered. The panes are not initialized until onAdd is called by the API.

#### `getProjection`

`getProjection()`

**Parameters:** None

**Return Type** : `(Projection | null)`

Retrieves the map canvas `Projection` object associated with this `OverlayView`. The projection is not initialized until `onAdd` is called by the API.

#### `onAdd`

`onAdd()`

**Parameters:** None

**Return Type** : `void`

This method should be implemented to initialize the overlay DOM elements. It is called once after `setMap()` is called with a valid map. At this point, panes and projection will have been initialized.

#### `onRemove`

`onRemove()`

**Parameters:** None

**Return Type** : `void`

This method should be implemented to remove your elements from the DOM. It is called once following a call to `setMap(null)`.

#### `setMap`

`setMap(map)`

**Parameters:**
- `map`: `Map` The map to add the overlay to, or null to remove it.

**Return Type** : `void`

Adds or removes the overlay from the map.

  

## Point class

`woosmap.map.Point`

### Constructor

#### `Point`

`Point(x, y)`

**Parameters:**
- `x`: `number` 
- `y`: `number` 

Creates a Point object

  

### Methods

#### `equals`

`equals(other)`

**Parameters:**
- `other`: `Point` 

**Return Type** : `boolean`

Indicates whether some other object is “equal to” this one.

  

## Polygon class

`woosmap.map.Polygon`

This class extends `BasePolygon`. 

### Constructor

#### `Polygon`

`Polygon(options)`

**Parameters:**
- `options`: `PolygonOptions` 

Constructs a polygon.

  

### Methods

#### `getPath`

`getPath()`

**Parameters:** None

**Return Type** : `MVCArray<LatLng>`

Returns the outer path of the polygon.

#### `getPaths`

`getPaths()`

**Parameters:** None

**Return Type** : `MVCArray<MVCArray<LatLng>>`

Returns all the path that compose the polygon.

#### `setOptions`

`setOptions(options)`

**Parameters:**
- `options`: `PolygonOptions` 

**Return Type** : `void`

Sets the polygon options.

#### `setPath`

`setPath(path)`

**Parameters:**
- `path`: `MVCArray<LatLng>` 

**Return Type** : `void`

Sets the polygon path.

#### `setPaths`

`setPaths(paths)`

**Parameters:**
- `paths`: `MVCArray<MVCArray<LatLng>>` 

**Return Type** : `void`

Sets the polygon paths.

  

## Polyline class

`woosmap.map.Polyline`

This class extends `BaseGeometry`. 

### Constructor

#### `Polyline`

`Polyline(options)`

**Parameters:**
- `options`: `PolylineOptions` 

Constructs a Polyline.

  

### Methods

#### `getPath`

`getPath()`

**Parameters:** None

**Return Type** : `MVCArray<LatLng>`

#### `setOptions`

`setOptions(options)`

**Parameters:**
- `options`: `PolylineOptions` 

**Return Type** : `void`

#### `setPath`

`setPath(path)`

**Parameters:**
- `path`: `MVCArray<LatLng>` 

**Return Type** : `void`

  

## Rectangle class

`woosmap.map.Rectangle`

This class extends `BasePolygon`. 

### Constructor

#### `Rectangle`

`Rectangle(options)`

**Parameters:**
- `options`: `RectangleOptions` 

Constructs a Rectangle.

  

### Methods

#### `getBounds`

`getBounds()`

**Parameters:** None

**Return Type** : `LatLngBounds`

#### `setBounds`

`setBounds(bounds)`

**Parameters:**
- `bounds`: `LatLngBounds` 

**Return Type** : `void`

#### `setOptions`

`setOptions(options)`

**Parameters:**
- `options`: `RectangleOptions` 

**Return Type** : `void`

  

## Size class

`woosmap.map.Size`

### Constructor

#### `Size`

`Size(width, height)`

**Parameters:**
- `width`: `number` 
- `height`: `number` 

Creates a Size object

  

### Methods

#### `equals`

`equals(other)`

**Parameters:**
- `other`: `Size` 

**Return Type** : `boolean`

Indicates whether some other object is “equal to” this one.

  

## StoresOverlay class

`woosmap.map.StoresOverlay`

This class extends `woosmap.map.OverlayView`. 

### Constructor

#### `StoresOverlay`

`StoresOverlay(style)`

**Parameters:**
- `style`: `Style` 

Constructs a StoreOverlay

  

### Methods

#### `clearSelection`

`clearSelection()`

**Parameters:** None

**Return Type** : `void`

Clears selected store if any

#### `setSelection`

`setSelection(feature)`

**Parameters:**
- `feature`: `Object` 

**Return Type** : `void`

Sets the selected store

#### `setQuery`

`setQuery(query?)`

**Parameters:**
- `query`: `(string | null)` 

**Return Type** : `void`

Sets the query used to fetch stores. To clear the query set it to undefined.

#### `setMap`

`setMap(map?)`

**Parameters:**
- `map`: `(Map | null)` 

**Return Type** : `void`

  

### Events

#### `store_unselected`

This event is triggered when a store previously selected was unselected.

#### `store_selected`

This event is triggered when a store is selected

  

## StoresService class

`woosmap.map.StoresService`

Contains methods related to retrieving stores and stores’ bounds.

### Constructor

#### `StoresService`

`StoresService()`

**Parameters:** None

Contains methods related to retrieving stores and stores’ bounds.

  

### Methods

#### `autocomplete`

`autocomplete(request)`

**Parameters:**
- `request`: `StoresAutocompleteRequest` The store autocompletion request.

**Return Type** : `Promise<StoresAutocompleteResponse>`

Retrieves stores autocomplete suggestions based on the supplied autocomplete request.

#### `search`

`search(request)`

**Parameters:**
- `request`: `StoresSearchRequest` The store search request.

**Return Type** : `Promise<StoresSearchResponse>`

Searches stores based on the supplied search request.

#### `getStoreById`

`getStoreById(storeId)`

**Parameters:**
- `storeId`: `string` The store ID.

**Return Type** : `Promise<StoreResponse>`

Retrieves a store object based on the supplied store ID.

#### `getBounds`

`getBounds(request)`

**Parameters:**
- `request`: `StoresBoundsRequest` The bounds search request.

**Return Type** : `Promise<StoresBoundsResponse>`

Retrieves bounds of stores based on the supplied bounds search request.

  

## TransitRenderer class

`woosmap.map.TransitRenderer`

This class extends `MVCObject`. 

### Constructor

#### `TransitRenderer`

`TransitRenderer(options?)`

**Parameters:**
- `options`: `TransitRendererOptions` 

  

### Methods

#### `setMap`

`setMap(map)`

**Parameters:**
- `map`: `Map` 

Sets the map.

#### `setRouteIndex`

`setRouteIndex(routeIndex)`

**Parameters:**
- `routeIndex`: `number` 

Sets the current selected route.

#### `setRoutes`

`setRoutes(routes)`

**Parameters:**
- `routes`: `TransitRoute[]` 

Sets the transit routes to display.

  

### Events

#### `routeIndex_changed`

This event is triggered when the routeIndex changes.

  

## TransitService class

`woosmap.map.TransitService`

A service for computing route using public transportation networks.

### Constructor

#### `TransitService`

`TransitService()`

**Parameters:** None

A service for computing route using public transportation networks.

  

### Methods

#### `route`

`route(request)`

**Parameters:**
- `request`: `TransitRouteRequest` The transit route request.

**Return Type** : `Promise<TransitRouteResponse>`

Get distance, duration and path (as a polyline and transports details) for a pair of origin and destination, based on the recommended route between those two points and by using public transportations.

  

## Feature class

`woosmap.map.data.Feature`

### Constructor

#### `Feature`

`Feature(featureData)`

**Parameters:**
- `featureData`: `FeatureData` 

Constructs a new Data.Feature

  

### Methods

#### `getGeometry`

`getGeometry()`

**Parameters:** None

**Return Type** : `GeometryCollectionElement`

Returns the feature geometry.

#### `setGeometry`

`setGeometry(geometry)`

**Parameters:**
- `geometry`: `GeometryCollectionElement` 

**Return Type** : `void`

Set the feature geometry.

#### `getId`

`getId()`

**Parameters:** None

**Return Type** : `string`

Returns the feature id.

#### `getProperty`

`getProperty(name)`

**Parameters:**
- `name`: `string` 

**Return Type** : `any`

Returns the feature property

#### `removeProperty`

`removeProperty(name)`

**Parameters:**
- `name`: `string` 

**Return Type** : `void`

Removes property

#### `setProperty`

`setProperty(name, newValue)`

**Parameters:**
- `name`: `string` 
- `newValue`: `any` 

**Return Type** : `void`

Sets the value of the specified property. If newValue is undefined this is equivalent to calling removeProperty.

#### `toGeoJson`

`toGeoJson(callback)`

**Parameters:**
- `callback`: `(geojson: GeoJSONFeature) => void` 

**Return Type** : `void`

Exports the feature to a GeoJSON object.

  

### Events

#### `setgeometry`

This event is triggered when geometry is set.

#### `removeproperty`

This event is triggered when a property is removed.

#### `setproperty`

This event is triggered when a property is set.

  

## APIError class

`woosmap.map.errors.APIError`

This class extends `Error`. 

### Constructor

#### `APIError`

`APIError()`

**Parameters:** None

  

### Properties

#### `statusCode`

**Type** : ` number`

The http Status code extracted from the response.

  

## BadRequestError class

`woosmap.map.errors.BadRequestError`

This class extends `APIError`. 

### Constructor

#### `BadRequestError`

`BadRequestError(message?)`

**Parameters:**
- `message`: `string` 

  

## ForbiddenError class

`woosmap.map.errors.ForbiddenError`

This class extends `APIError`. 

### Constructor

#### `ForbiddenError`

`ForbiddenError(message?)`

**Parameters:**
- `message`: `string` 

  

## InternalServerError class

`woosmap.map.errors.InternalServerError`

This class extends `APIError`. 

### Constructor

#### `InternalServerError`

`InternalServerError(message?)`

**Parameters:**
- `message`: `string` 

  

## NotFoundError class

`woosmap.map.errors.NotFoundError`

This class extends `APIError`. 

### Constructor

#### `NotFoundError`

`NotFoundError(message?)`

**Parameters:**
- `message`: `string` 

  

## TooManyRequestsError class

`woosmap.map.errors.TooManyRequestsError`

This class extends `APIError`. 

### Constructor

#### `TooManyRequestsError`

`TooManyRequestsError(message?)`

**Parameters:**
- `message`: `string` 

  

## UnauthorizedError class

`woosmap.map.errors.UnauthorizedError`

This class extends `APIError`. 

### Constructor

#### `UnauthorizedError`

`UnauthorizedError(message?)`

**Parameters:**
- `message`: `string` 

  

## Field class

`woosmap.map.query.Field`

### Constructor

#### `Field`

`Field(key, value, operator?)`

**Parameters:**
- `key`: `string` 
- `value`: `string` 
- `operator`: `(Operators | null)` 

Represents a field filter. Used to build a string for query parameter to pass to Store Search Service.

  

### Methods

#### `toString`

`toString()`

**Parameters:** None

**Return Type** : `string`

Returns the field clause in query format.

  

## Query class

`woosmap.map.query.Query`

### Constructor

#### `Query`

`Query(children, connector, negate)`

**Parameters:**
- `children`: `Array<Query` 
- `connector`: `BoolOperators` 
- `negate`: `boolean` 

Represents a Query. Used to build a string for query parameter to pass to Store Search Service. Default operator is `BoolOperators.AND`

  

### Methods

#### `toString`

`toString()`

**Parameters:** None

**Return Type** : `string`

Returns the Query as a string usable for the search endpoint query parameter.

  

## AutocompleteMatchedSubstring Interface

### Properties

#### `length`

**Type** : ` number`

#### `offset`

**Type** : ` number`
  

## CircleOptions Interface

Type: `PolygonFillOptions`

### Properties

#### `center`

**Type** : ` (LatLng | null)`

The center of the circle.

#### `radius?`

**Type** : ` (number | null)`

The radius of the circle.

  

## ControlPositionType Interface

Type: `"top-left" | "top-right" | "bottom-left" | "bottom-right"`

## Coordinates Interface

Type: `[number, number]`

## Geometry Interface

### Methods

#### `getType`

`getType()`

**Parameters:** None

**Return Type** : `T`

Returns the type of the geometry.

  

## DatasetsFeature Interface

Full feature response, returned by Datasets get feature endpoint.

### Properties

#### `attributes`

**Type** : ` {}`

attributes of the feature.

#### `geometry`

**Type** : ` GeoJSONPoint`

The feature geometry, as geojson.

#### `id`

**Type** : ` string`

id of the feature (UUID).

  

## DatasetsFeatureSummary Interface

Summary feature response, part of DatasetsSearchResponse.

### Properties

#### `attributes`

**Type** : ` {}`

attributes table

#### `geometry`

**Type** : ` GeoJSONPoint`

the feature extent can be a point geometry if the geometry has no area.

#### `id`

**Type** : ` string`

The feature identifier

  

## DatasetsOverlayOptions Interface

### Properties

#### `defaultLineColor?`

**Type** : ` string`

Sets the line stroke color.

#### `defaultPointColor?`

**Type** : ` string`

Sets the point color.

#### `defaultPolygonFillColor?`

**Type** : ` string`

Sets the fill stroke color.

#### `defaultPolygonStrokeColor?`

**Type** : ` string`

Sets the polygon stroke color.

  

## DatasetsPagination Interface

Pagination information for DatasetsSearchResponse

### Properties

#### `next`

**Type** : ` number`

next page number if any.

#### `page`

**Type** : ` number`

Current page number, starts at 1

#### `prev`

**Type** : ` number`

previous page number if any.

  

## DatasetsPaginationRequest Interface

### Properties

#### `page?`

**Type** : ` number`

request a specific page.

#### `per_page?`

**Type** : ` number`

maximum feature count in the response.

  

## DatasetsSearchRequest Interface

### Properties

#### `where?`

**Type** : ` string`

Filter abiding the Woosmap query format. Applies to feature attributes.

  

## DatasetsSearchResponse Interface

### Properties

#### `features`

**Type** : ` DatasetsFeatureSummary[]`

Matching features.

#### `pagination`

**Type** : ` DatasetsPagination`

Pagination information.

  

## DatasetsSearchWithGeometryRequest Interface

### Properties

#### `buffer?`

**Type** : ` number`

Applies a buffer operation on the request geometry. The value is the radius in meters.

#### `geometry`

**Type** : ` T`

Geometry used in the search operation.

#### `where?`

**Type** : ` string`

Filter abiding the Woosmap query format. Applies to feature attributes.

  

## DatasetsSearchWithInputGeometryRequest Interface

Type: `DatasetsSearchWithGeometryRequest<GeoJSONPolygon | GeoJSONLineString | GeoJSONPoint>`

## DatasetsSearchWithPolygonGeometryRequest Interface

Type: `DatasetsSearchWithGeometryRequest<GeoJSONPolygon>`

## DirectionLeg Interface

### Properties

#### `distance`

**Type** : ` Distance`

#### `duration`

**Type** : ` Duration`

#### `end_address`

**Type** : ` string`

#### `end_location`

**Type** : ` LatLngLiteral`

#### `end_waypoint`

**Type** : ` number`

#### `start_address`

**Type** : ` string`

#### `start_location`

**Type** : ` LatLngLiteral`

#### `start_waypoint`

**Type** : ` number`

#### `steps?`

**Type** : ` DirectionStep[]`
  

## DirectionRequest Interface

### Properties

#### `arrival_time?`

**Type** : ` string`

Valid values are a timestamp (e.g. 1600799173 for the date:22/09/2020 20:26:13) or now. Use either arrival\_time or departure\_time, not both.

#### `avoidFerries?`

**Type** : ` boolean`

If `true`, instructs the directions service to avoid ferries where possible. Optional.

#### `avoidHighways?`

**Type** : ` boolean`

If `true`, instructs the directions service to avoid highways where possible. Optional.

#### `avoidTolls?`

**Type** : ` boolean`

If `true`, instructs the directions service to avoid toll roads where possible. Optional.

#### `avoidZones?`

**Type** : ` LatLng[][]`

If set, instructs the directions service to avoid the specific polygons.

#### `departure_time?`

**Type** : ` string`

Valid values are a timestamp (e.g. 1600799173 for the date:22/09/2020 20:26:13) or now. Use either arrival\_time or departure\_time, not both.

#### `destination`

**Type** : ` LatLng`

#### `details?`

**Type** : ` "none"`

When set to full the response will contain detailed driving instructions.

#### `language?`

**Type** : ` string`

The language code, indicating in which language the results should be returned

#### `method?`

**Type** : ` "time"`

Specifies the method to compute the route between the start point and the end point

#### `optimizeWaypoints?`

**Type** : ` boolean`

#### `origin`

**Type** : ` LatLng`

#### `provideRouteAlternatives?`

**Type** : ` boolean`

#### `travelMode?`

**Type** : ` string`

#### `unitSystem?`

**Type** : ` string`

#### `waypoints?`

**Type** : ` DirectionsWayPoint[]`
  

## DirectionResult Interface

### Properties

#### `error_message?`

**Type** : ` string`

#### `routes`

**Type** : ` DirectionRoute[]`

#### `status`

**Type** : ` string`
  

## DirectionRoute Interface

### Properties

#### `bounds`

**Type** : ` DirectionsBounds`

#### `legs`

**Type** : ` DirectionLeg[]`

#### `main_route_name?`

**Type** : ` string`

The main route name, determined by the longest step length, used to differentiate routes when alternatives are provided. Note: This is not returned when computing routes with traffic.

#### `notice`

**Type** : ` string`

additional information of the route.

#### `overview_path?`

**Type** : ` LatLng[]`

The decoded overview path.

#### `overview_polyline`

**Type** : ` DirectionsOverviewPolyline`

The encoded overview polyline.

#### `recommended?`

**Type** : ` boolean`

Indicates if the route is the recommended one. Present and set to true only for the recommended route.

  

## DirectionStep Interface

### Properties

#### `distance`

**Type** : ` string`

#### `duration`

**Type** : ` string`

#### `end_location`

**Type** : ` LatLngLiteral`

#### `instructions`

**Type** : ` DirectionStepInstructions`

#### `start_location`

**Type** : ` LatLngLiteral`

#### `travelMode`

**Type** : ` string`
  

## DirectionStepInstructions Interface

### Properties

#### `action`

**Type** : ` number`

#### `summary`

**Type** : ` string`

#### `verbal_after?`

**Type** : ` string`

#### `verbal_alert?`

**Type** : ` string`

#### `verbal_before?`

**Type** : ` string`

#### `verbal_succint?`

**Type** : ` string`
  

## DirectionsBounds Interface

### Properties

#### `northeast`

**Type** : ` LatLngLiteral`

#### `southwest`

**Type** : ` LatLngLiteral`
  

## DirectionsOverviewPolyline Interface

### Properties

#### `points`

**Type** : ` string`

Contains encoded polyline.

  

## DirectionsRendererOptions Interface

### Properties

#### `directions?`

**Type** : ` DirectionResult`

#### `draggable?`

**Type** : ` boolean`

#### `map?`

**Type** : ` Map`

#### `markerOption?`

**Type** : ` Object`

#### `preserveViewport?`

**Type** : ` boolean`

#### `routeIndex?`

**Type** : ` number`

#### `suppressBicyclingLayer?`

**Type** : ` boolean`

#### `suppressInfoWindows?`

**Type** : ` boolean`

#### `suppressMarkers?`

**Type** : ` boolean`

#### `suppressPolylines?`

**Type** : ` boolean`
  

## DirectionsWayPoint Interface

### Properties

#### `location`

**Type** : ` LatLng`

Waypoint location.

#### `stopover?`

**Type** : ` boolean`

If set to `true` the route will be splitted into two legs.

  

## Distance Interface

A representation of distance as a numeric value and a display string.

### Properties

#### `text`

**Type** : ` string`

#### `value`

**Type** : ` number`
  

## Duration Interface

A representation of duration as a numeric value and a display string.

### Properties

#### `text`

**Type** : ` string`

#### `value`

**Type** : ` number`
  

## FeatureData Interface

### Properties

#### `geometry?`

**Type** : ` GeometryClasses`

#### `id?`

**Type** : ` any`

#### `properties?`

**Type** : ` Object`
  

## FlyToOptions Interface

### Properties

#### `animate?`

**Type** : ` boolean`

Controls whether to animate or not.

#### `around?`

**Type** : ` LatLng`

If `zoom` is specified, `around` determines the point around which the zoom is centered.

#### `bearing?`

**Type** : ` number`

The target bearing in degrees.

#### `center?`

**Type** : ` LatLng`

The target center.

#### `duration?`

**Type** : ` number`

The animation’s duration (in milliseconds).

#### `easing?`

**Type** : ` (_: number) => number`

A function taking a time in the range 0..1 and returning a number where 0 is the start state and 1 is the final state.

#### `essential?`

**Type** : ` boolean`

If `false`, then the animation can be avoided if the user browser has `prefers-reduced-motion` turned on.

#### `offset?`

**Type** : ` Point`

The target center relative to real map container center at the end of animation.

#### `padding?`

**Type** : ` Padding`

Padding to apply when centering the map.

#### `pitch?`

**Type** : ` number`

The target pitch (angle towards horizon) in degrees.

#### `zoom?`

**Type** : ` number`

The target zoom level.

  

## GeoJSONFeature Interface

### Properties

#### `geometry`

**Type** : ` GeoJSONGeometry`

#### `id?`

**Type** : ` number`

#### `properties`

**Type** : ` {}`

#### `type`

**Type** : ` "Feature"`
  

## GeoJSONFeatureCollection Interface

### Properties

#### `features`

**Type** : ` GeoJSONFeature[]`

#### `type`

**Type** : ` "FeatureCollection"`
  

## GeoJSONGeometry Interface

Type: `GeoJSONPoint | GeoJSONMultiPoint | GeoJSONLineString | GeoJSONMultiLineString | GeoJSONPolygon | GeoJSONMultiPolygon | GeoJSONGeometryCollection`

## GeoJSONGeometryCollection Interface

### Properties

#### `geometries`

**Type** : ` GeoJSONGeometry[]`

#### `type`

**Type** : ` "GeometryCollection"`
  

## GeoJSONLineString Interface

Type: `GeoJSONRawGeometry<"LineString", GeoJSONPosition[]>`

## GeoJSONMultiLineString Interface

Type: `GeoJSONRawGeometry<"MultiLineString", GeoJSONPosition[][]>`

## GeoJSONMultiPoint Interface

Type: `GeoJSONRawGeometry<"MultiPoint", GeoJSONPosition[]>`

## GeoJSONMultiPolygon Interface

Type: `GeoJSONRawGeometry<"MultiPolygon", GeoJSONPosition[][][]>`

## GeoJSONPoint Interface

Type: `GeoJSONRawGeometry<"Point", GeoJSONPosition>`

## GeoJSONPolygon Interface

Type: `GeoJSONRawGeometry<"Polygon", GeoJSONPosition[][]>`

## GeoJSONPosition Interface

Type: `[number, number]`

## GeoJSONRawGeometry Interface

### Properties

#### `coordinates`

**Type** : ` C`

#### `type`

**Type** : ` T`
  

## GeometryArray Interface

Type: `GeometryCollectionElement[]`

## GeometryClasses Interface

Type: `GeometryCollectionElement | GeometryCollection`

## GeometryCollectionElement Interface

Type: `Point | MultiPoint | LineString | MultiLineString | Polygon | MultiPolygon`

## GeometryData Interface

### Properties

#### `coordinates`

**Type** : ` any`

#### `geometries?`

**Type** : ` GeometryData[]`

#### `type`

**Type** : ` GeometryType`
  

## GeometryOptions Interface

### Properties

#### `clickable?`

**Type** : ` (boolean | null)`

#### `draggable?`

**Type** : ` (boolean | null)`

#### `editable?`

**Type** : ` (boolean | null)`

#### `geodesic?`

**Type** : ` (boolean | null)`

#### `map?`

**Type** : ` (Map | null)`

#### `strokeColor?`

**Type** : ` (string | null)`

#### `strokeOpacity?`

**Type** : ` (number | null)`

#### `strokePosition?`

**Type** : ` string`

#### `strokeWeight?`

**Type** : ` (number | null)`

#### `visible?`

**Type** : ` (boolean | null)`

Whether the Geometry is visible or not.

#### `zIndex?`

**Type** : ` (number | null)`
  

## GeometryType Interface

Type: `"Point" | "MultiPoint" | "LineString" | "MultiLineString" | "LinearRing" | "Polygon" | "MultiPolygon" | "GeometryCollection"`

## GestureHandlingMode Interface

Type: `"none" | "greedy" | "cooperative" | "auto"`

## Icon Interface

### Properties

#### `anchor?`

**Type** : ` Point`

#### `labelOrigin?`

**Type** : ` Point`

#### `scaledSize?`

**Type** : ` Size`

#### `size?`

**Type** : ` Size`

#### `url`

**Type** : ` string`
  

## IconSequence Interface

### Properties

#### `fixedRotation?`

**Type** : ` (boolean | null)`

#### `icon?`

**Type** : ` (SymbolIcon | null)`

#### `offset?`

**Type** : ` (string | null)`

#### `repeat?`

**Type** : ` (string | null)`
  

## ImageMapTypeOptions Interface

### Properties

#### `alt?`

**Type** : ` (string | null)`

#### `getTileUrl?`

**Type** : ` ((point: Point, zoom: number) => (string | null) | null)`

#### `maxZoom?`

**Type** : ` (number | null)`

The maximum zoom level at which the image map type should be visible.

#### `minZoom?`

**Type** : ` (number | null)`

The minimum zoom level at which the image map type should be visible.

#### `name?`

**Type** : ` (string | null)`

#### `opacity?`

**Type** : ` (number | null)`

Opacity of the tile layer (between 0, 1).

#### `scheme?`

**Type** : ` "xyz"`

The tile scheme to use `xyz` or `tms`.

#### `tileSize?`

**Type** : ` (Size | null)`

#### `url?`

**Type** : ` string`

The tile url scheme use {x}, {y} and {z} url templates. Example: `https://tile.openstreetmap.org/{z}/{x}/{y}.png`

  

## InfoWindowOptions Interface

### Properties

#### `content?`

**Type** : ` (string`

Content to display in the InfoWindow. This can be an HTML element, a plain-text string, or a string containing HTML. The InfoWindow will be sized according to the content.

#### `disableAutoPan?`

**Type** : ` (boolean | null)`

Disable auto-pan on open. By default, the info window will pan the map so that it is fully visible when it opens.

#### `maxWidth?`

**Type** : ` (number | null)`

Maximum width of the infowindow, regardless of content’s width. This value is only considered if it is set before a call to open.

#### `pixelOffset?`

**Type** : ` Point`

The offset, in pixels, of the tip of the info window from the point on the map at whose geographical coordinates the info window is anchored.

  

## LatLngBoundsLiteral Interface

### Properties

#### `east`

**Type** : ` number`

#### `north`

**Type** : ` number`

#### `south`

**Type** : ` number`

#### `west`

**Type** : ` number`
  

## LatLngLiteral Interface

### Properties

#### `lat`

**Type** : ` number`

Latitude in degrees. Values will be clamped to the range [-90, 90]. This means that if the value specified is less than -90, it will be set to -90. And if the value is greater than 90, it will be set to 90.

#### `lng`

**Type** : ` number`

Longitude in degrees. Values outside the range [-180, 180] will be wrapped so that they fall within the range. For example, a value of -190 will be converted to 170. A value of 190 will be converted to -170. This reflects the fact that longitudes wrap around the globe.

  

## MapEventListener Interface

An event listener, created by woosmap.map.event.addListener() and friends.

### Methods

#### `remove`

`remove()`

**Parameters:** None

**Return Type** : `void`

Calling `listener.remove()` is equivalent to `woosmap.map.event.removeListener(listener)`.

  

## MapOptions Interface

MapOptions object used to define the properties that can be set on a Map.

### Properties

#### `center?`

**Type** : ` LatLng`

The initial map center to start from.

#### `defaultStyle?`

**Type** : ` string`

#### `disable3dBuilding?`

**Type** : ` boolean`

Disable the rendering of the buildings in 3D when the map is pitched.

#### `disableDefaultUI?`

**Type** : ` boolean`

Disables the default maps controls interface, (default: false).

#### `disableTilt?`

**Type** : ` boolean`

Disable the tilt and rotation controls for the users. When set to `true`, this prevents map tilt as well as rotation via touch gestures (two-finger rotate) and keyboard shortcuts (Shift+Arrow keys), (default: false).

#### `enableMarkerAccessibleNavigation?`

**Type** : ` boolean`

Enables the markers to be selected using tab and keyboard arrows.

#### `gestureHandling?`

**Type** : ` GestureHandlingMode`

This option controls how the gesture are handled Depending on the value when gesture on the map is detected (scroll on desktop, one finger pan on mobile) an overlay asking the user to use Cmd or Ctrl while scrolling or use two finger gesture to pan on mobile will be shown.

- `cooperative`: Shows the overlay only if the page is scrollable.
- `greedy`: Never shows the overlay.
- `none`: Disables gesture handling. The map cannot be zoomed or paned using gestures.
- `auto`: (default) Use cooperative mode if the page is scrollable, else use greedy mode.

#### `heading?`

**Type** : ` number`

The initial heading to start from.

#### `mapTypeControl?`

**Type** : ` boolean`

Whether to display the map type control. Defaults to false.

#### `mapTypeId?`

**Type** : ` string`

The initial map type. Defaults to `MapTypeId.ROADMAP`.

#### `styles?`

**Type** : ` (MapStyleSpec[] | null)`

```json
[
  {
    "featureType": "poi",
    "stylers": [
      {
        "visibility": "on"
      }
    ]
  },
  {
    "featureType": "water",
    "stylers": [
      {
        "saturation": -100
      }
    ]
  }
]
```

#### `[`

#### `{`

#### `"featureType": "poi",`

#### `"stylers": [`

#### `{`

#### `"visibility": "on"`

#### `}`

#### `]`

#### `},`

#### `{`

#### `"featureType": "water",`

#### `"stylers": [`

#### `{`

#### `"saturation": -100`

#### `}`

#### `]`

#### `}`

#### `]`

#### `tilt?`

**Type** : ` number`

The initial tilt to start from.

#### `visualRefresh?`

**Type** : ` boolean`

Opt into the upcoming visual refresh styles. When true, the resolved style is upgraded to its refreshed counterpart (e.g. `streets` -\> `streets_next`). If unset, falls back to `woosmap.map.config.getVisualRefresh()` (default false). Experimental — will be removed once the refreshed styles become the default.

#### `zoom?`

**Type** : ` number`

The initial map zoom level to start from.

  

## MapPanes Interface

### Properties

#### `floatPane`

**Type** : ` Element`

This pane contains the info window. It is above all map overlays. (Pane 4).

#### `mapPane`

**Type** : ` Element`

#### `markerLayer`

**Type** : ` Element`

This pane is the lowest pane and is above the tiles. It does not receive DOM events. (Pane 0).

#### `overlayLayer`

**Type** : ` Element`

This pane contains polylines, polygons, ground overlays and tile layer overlays. It does not receive DOM events. (Pane 1).

#### `overlayMouseTarget`

**Type** : ` Element`

This pane contains elements that receive DOM events. (Pane 3).

  

## MapStyleSpec Interface

### Properties

#### `elementType?`

**Type** : ` string`

The group of elements, to which stylers will be applied. default value: “all”

#### `featureType?`

**Type** : ` string`

The group of feature, to which stylers will be applied. default value: “all”

#### `stylers`

**Type** : ` MapStyler[]`

The rules to apply to the selected features.

  

## MapStyler Interface

### Properties

#### `color?`

**Type** : ` string`

The color to use to style features. Expected to be in hex form `#RRBBGG`.

#### `gamma?`

**Type** : ` number`

Applies a gamma correction on lightness.

#### `hue?`

**Type** : ` string`

The color to extract the hue from. The lightness and saturation will be kept from the original color.

#### `invert_lightness?`

**Type** : ` boolean`

Inverts the lightness.

#### `lightness?`

**Type** : ` number`

Changes the lightness.

#### `saturation?`

**Type** : ` number`

Changes the saturation

#### `visibility?`

**Type** : ` string`

Sets the visibility of the selected features. Expected to be in hex form `#RRBBGG`. expected values are “on”, “off”

#### `weight?`

**Type** : ` number`

Changes the weight of drawn features (mostly lines, labels outline).

  

## MapType Interface

### Properties

#### `maxZoom`

**Type** : ` number`

Displays the overlay up to the maximum zoom level.

#### `minZoom`

**Type** : ` number`

Displays the overlay startingat the minmum zoom level.

  

### Methods

#### `getTile`

`getTile(tileCoord, zoom, ownerDocument)`

**Parameters:**
- `tileCoord`: `Point` 
- `zoom`: `number` 
- `ownerDocument`: `null` 

**Return Type** : `(Element | null)`

#### `releaseTile`

`releaseTile(tile)`

**Parameters:**
- `tile`: `Element` 

**Return Type** : `void`

  

## MarkerAnimateOptions Interface

### Properties

#### `complete?`

**Type** : ` Function`

A callback function to be called after setting the position. null as default

#### `duration?`

**Type** : ` number`

The animation’s duration (in milliseconds).

  

## MarkerLabel Interface

### Properties

#### `color?`

**Type** : ` string`

The color of the label. Default to: black.

#### `fontSize?`

**Type** : ` string`

The font size of the label in pixels. Default to: 14px.

#### `parsedFontSize`

**Type** : ` number`

#### `text`

**Type** : ` string`

The text to be displayed in the label.

  

## MarkerLabelOptions Interface

### Properties

#### `className?`

**Type** : ` (string | null)`

A custom className property to be applied to the label’s element.

#### `color?`

**Type** : ` (string | null)`

The color of the label text. (black by default).

#### `fontFamily?`

**Type** : ` (string | null)`

The font family for the label.

#### `fontSize?`

**Type** : ` (string | null)`

The font size for the label.

#### `fontWeight?`

**Type** : ` (string | null)`

The font weight for the label.

#### `text`

**Type** : ` string`

The text to be displayed in the label.

  

## MarkerOptions Interface

### Properties

#### `anchorPoint?`

**Type** : ` Point`

The offset from the marker’s position to the tip of an InfoWindow that has been opened with the marker as anchor.

#### `clickable?`

**Type** : ` boolean`

If true the marker receive the click events. Default value is true.

#### `draggable?`

**Type** : ` boolean`

#### `icon?`

**Type** : ` string`

The icon to display. When icon is a string it is treated as Icon with the string as `url` property.

#### `label?`

**Type** : ` string`

Adds a letter or number label inside a marker.

#### `map?`

**Type** : ` Map`

The Map where the marker should be displayed.

#### `opacity?`

**Type** : ` number`

The marker’s opacity (min: 0, max: 1)

#### `position`

**Type** : ` LatLng`

The markers’s position.

#### `title?`

**Type** : ` (string | null)`

#### `visible?`

**Type** : ` boolean`

If true the marker will be visible. Default value is true

  

## MatchedSubstring Interface

### Properties

#### `description`

**Type** : ` AutocompleteMatchedSubstring[]`
  

## Padding Interface

### Properties

#### `bottom?`

**Type** : ` number`

#### `left?`

**Type** : ` number`

#### `right?`

**Type** : ` number`

#### `top?`

**Type** : ` number`
  

## Pagination Interface

### Properties

#### `page`

**Type** : ` number`

#### `pageCount`

**Type** : ` number`
  

## PointLiteral Interface

### Properties

#### `x`

**Type** : ` number`

x coordinate \*

#### `y`

**Type** : ` number`

y coordinate \*

  

## PolygonFillOptions Interface

Type: `GeometryOptions`

### Properties

#### `fillColor?`

**Type** : ` (string | null)`

#### `fillOpacity?`

**Type** : ` (number | null)`
  

## PolygonOptions Interface

Type: `PolygonFillOptions`

### Properties

#### `paths`

**Type** : ` (MVCArray<MVCArray<LatLng>> | null)`

The paths of the polygon.

  

## PolylineOptions Interface

Type: `GeometryOptions`

### Properties

#### `path`

**Type** : ` (MVCArray<LatLng> | null)`

The path of the polyline.

  

## Projection Interface

This object is made available to the OverlayView from within the draw method.

### Methods

#### `fromLatLngToContainerPixel`

`fromLatLngToContainerPixel(latlng)`

**Parameters:**
- `latlng`: `LatLng` The geographical location to convert.

**Return Type** : `Point`

Converts a geographical location to pixel coordinates within the map’s container element.

#### `fromContainerPixelToLatLng`

`fromContainerPixelToLatLng(point)`

**Parameters:**
- `point`: `Point` The pixel coordinates to convert.

**Return Type** : `LatLng`

Converts pixel coordinates within the map’s container element to a geographical location.

#### `fromLatLngToDivPixel`

`fromLatLngToDivPixel(latlng)`

**Parameters:**
- `latlng`: `LatLng` The geographical location to convert.

**Return Type** : `Point`

Converts a geographical location to pixel coordinates within the DOM element that holds the draggable map.

#### `fromDivPixelToLatLng`

`fromDivPixelToLatLng(point)`

**Parameters:**
- `point`: `Point` The pixel coordinates to convert.

**Return Type** : `LatLng`

Converts pixel coordinates within the DOM element that holds the draggable map to a geographical location.

  

## RectangleOptions Interface

Type: `PolygonFillOptions`

### Properties

#### `bounds`

**Type** : ` (LatLngBounds | null)`

The bounds of the Rectangle.

  

## SizeLiteral Interface

### Properties

#### `height`

**Type** : ` number`

#### `width`

**Type** : ` number`
  

## Style Interface

### Properties

#### `breakPoint`

**Type** : ` number`

#### `default`

**Type** : ` StyleRule`

#### `rules`

**Type** : ` TypedStyleRule[]`
  

## StyleFunction Interface

Type: `(feature: Feature) => StyleOptions`

## StyleOptions Interface

### Properties

#### `animation?`

**Type** : ` Animation`

#### `clickable?`

**Type** : ` boolean`

#### `cursor?`

**Type** : ` string`

#### `draggable?`

**Type** : ` boolean`

#### `editable?`

**Type** : ` boolean`

#### `fillColor?`

**Type** : ` string`

#### `fillOpacity?`

**Type** : ` number`

#### `icon?`

**Type** : ` string`

#### `iconImage?`

**Type** : ` string`

#### `icons?`

**Type** : ` IconSequence[]`

#### `label?`

**Type** : ` string`

#### `opacity?`

**Type** : ` number`

#### `strokeColor?`

**Type** : ` string`

#### `strokeOpacity?`

**Type** : ` number`

#### `strokeWeight?`

**Type** : ` number`

#### `title?`

**Type** : ` string`

#### `visible?`

**Type** : ` boolean`

#### `zIndex?`

**Type** : ` number`
  

## StyleRule Interface

### Properties

#### `color`

**Type** : ` string`

#### `icon`

**Type** : ` Icon`

#### `minSize?`

**Type** : ` number`

#### `selectedIcon?`

**Type** : ` Icon`

#### `size?`

**Type** : ` number`
  

## SymbolIcon Interface

### Properties

#### `anchor?`

**Type** : ` (Point | null)`

The position of the symbol relative to the marker or polyline. The coordinates of the symbol’s path are translated left and up by the anchor’s x and y coordinates respectively. By default, a symbol is anchored at(0, 0). The position is expressed in the same coordinate system as the symbol’s path.

#### `fillColor?`

**Type** : ` (string | null)`

The symbol’s fill color. All CSS3 colors are supported except for extended named colors. For symbol markers, this defaults to ‘black’. For symbols on polylines, this defaults to the stroke color of the corresponding polyline.

#### `fillOpacity?`

**Type** : ` (number | null)`

The symbol’s fill opacity. Defaults to 0.

#### `labelOrigin?`

**Type** : ` (Point | null)`

The origin of the label relative to the origin of the path, if label is supplied by the marker. By default, the origin is located at(0, 0). The origin is expressed in the same coordinate system as the symbol’s path. ` This property is unused for symbols on polylines.

#### `path`

**Type** : ` string`

The symbol’s path, which is a built-in symbol path, or a custom path expressed using SVG path notation.

#### `rotation?`

**Type** : ` (number | null)`

The angle by which to rotate the symbol, expressed clockwise in degrees. Defaults to 0. A symbol in an IconSequence where fixedRotation is false is rotated relative to the angle of the edge on which it lies.

#### `scale?`

**Type** : ` (number | null)`

The amount by which the symbol is scaled in size. For symbol markers, this defaults to 1; after scaling, the symbol may be of any size. For symbols on a polyline, this defaults to the stroke weight of the polyline; after scaling, the symbol must lie inside a square 22 pixels in size centered at the symbol’s anchor.

#### `strokeColor?`

**Type** : ` (string | null)`

The symbol’s stroke color. All CSS3 colors are supported except for extended named colors. For symbol markers, this defaults to ‘black’. For symbols on a polyline, this defaults to the stroke color of the polyline.

#### `strokeOpacity?`

**Type** : ` (number | null)`

The symbol’s stroke opacity. For symbol markers, this defaults to 1. For symbols on a polyline, this defaults to the stroke opacity of the polyline.

#### `strokeWeight?`

**Type** : ` (number | null)`

The symbol’s stroke weight. Defaults to the scale of the symbol.

  

## TransitRendererOptions Interface

### Properties

#### `map?`

**Type** : ` Map`

#### `preserveViewport?`

**Type** : ` boolean`

#### `routes?`

**Type** : ` TransitRoute[]`

#### `showDecorations?`

**Type** : ` boolean`
  

## TypedStyleRule Interface

### Properties

#### `color`

**Type** : ` string`

#### `icon`

**Type** : ` Icon`

#### `selectedIcon?`

**Type** : ` Icon`

#### `type`

**Type** : ` string`
  

## DistanceIsochroneRequest Interface

A Distance Isochrone request to be sent to `DistanceService.getDistanceIsochrone` containing an origin and a distance value as minutes or kilometers.

### Properties

#### `avoidFerries?`

**Type** : ` boolean`

If `true`, instructs the Distance service to avoid ferries where possible. Optional.

#### `avoidHighways?`

**Type** : ` boolean`

If `true`, instructs the Distance service to avoid highways where possible. Optional.

#### `avoidTolls?`

**Type** : ` boolean`

If `true`, instructs the Distance service to avoid toll roads where possible. Optional.

#### `avoidZones?`

**Type** : ` LatLng[][]`

If set, instructs the Distance service to avoid the specific polygons.

#### `language?`

**Type** : ` string`

Defines in which language the results should be returned, if possible

#### `method?`

**Type** : ` "time"`

Defines the method to compute the rpute between the start point and the end point. `time` for the fastest route and `distance` for the shortest route.

#### `origin`

**Type** : ` LatLng`

The starting point.

#### `travelMode?`

**Type** : ` string`

The travel mode requested. see `woosmap.map.TravelMode`

#### `unitSystem?`

**Type** : ` string`

The unit system requested. see `UnitSystem`

#### `value`

**Type** : ` number`

The value to use for isochrone contour. You can specify time in minutes or distance in kilometers (cf. method parameter). The maximum value that can be specified is 120 (120 minutes : 2 hours or 120 km).

  

## DistanceIsochroneResponse Interface

The response to a `DistanceService.getDistanceIsochrone` request, consisting of a status, and a `DistanceIsoline` object.

### Properties

#### `error_message?`

**Type** : ` string`

The message describing a Distance Isochrone API request error. Present only if status is not OK.

#### `isoline`

**Type** : ` DistanceIsoline`

Contains the properties of isoline

#### `status`

**Type** : ` string`

The status returned. see `woosmap.map.distance.DistanceServiceStatus` {DistanceServiceStatus}

  

## DistanceIsoline Interface

The isochrone object which represents a line of points of equal travel time or distance around the given origin.

### Properties

#### `distance?`

**Type** : ` Distance`

The distance of the isochrone (returned only if method=distance in parameters)

#### `geometry`

**Type** : ` string`

The encoded polyline of the isoline.

#### `origin`

**Type** : ` LatLngLiteral`

An object describing the input location with Latitude and Longitude in decimal degrees.

#### `path?`

**Type** : ` LatLng[]`

The decoded polyline of the isoline.

#### `time?`

**Type** : ` Duration`

The time of the isochrone (returned as default or when specifying method=time in parameters)

  

## DistanceMatrixElement Interface

A single Distance Matrix element which contains the status, duration and distance from one origin to one destination.

### Properties

#### `distance`

**Type** : ` Distance`

The total distance of this matrix element expressed in meters (value) and as text.

#### `duration`

**Type** : ` Duration`

The total duration of this matrix element, expressed in seconds (value) and as text.

#### `status`

**Type** : ` "OK"`

Status returned for Distance Matrix Element.

- `OK` indicates the response contains a valid result.
- `NOT_FOUND` indicates that the origin and/or destination of this pairing could not be matched to the network.
- `ZERO_RESULTS` indicates no route could be found between the origin and destination.

  

## DistanceMatrixRequest Interface

A Distance Matrix request to be sent to `DistanceService.getDistanceMatrix` containing a list of origins and a list of destinations.

### Properties

#### `avoidFerries?`

**Type** : ` boolean`

If `true`, instructs the Distance service to avoid ferries where possible. Optional.

#### `avoidHighways?`

**Type** : ` boolean`

If `true`, instructs the Distance service to avoid highways where possible. Optional.

#### `avoidTolls?`

**Type** : ` boolean`

If `true`, instructs the Distance service to avoid toll roads where possible. Optional.

#### `avoidZones?`

**Type** : ` LatLng[][]`

If set, instructs the Distance service to avoid the specific polygons.

#### `departureTime?`

**Type** : ` Date`

By using this parameter, Distance will calculate the duration with traffic Specifies the date/time at which to base the calculations on for traffic purposes. Valid values are a `Date` or a string timestamp or “now”.

#### `destinations`

**Type** : ` LatLng[]`

An array containing destinations latlng to which to calculate distance and time. Required.

#### `elements?`

**Type** : ` "distance"`

Defines element values that will be part of the response (distance and/or duration). if not specified default is distance

#### `language?`

**Type** : ` string`

Defines in which language the results should be returned, if possible

#### `method?`

**Type** : ` "time"`

Defines the method to compute the rpute between the start point and the end point. `time` for the fastest route and `distance` for the shortest route.

#### `origins`

**Type** : ` LatLng[]`

An array containing origins latlng from which to calculate distance and time. Required.

#### `travelMode?`

**Type** : ` string`

#### `unitSystem?`

**Type** : ` string`

The unit system requested. see `UnitSystem`

  

## DistanceMatrixResponse Interface

The response to a `DistanceService.getDistanceMatrix` request, consisting of a status, and a list of `DistanceMatrixResponseRow`s, one for each corresponding origin location.

### Properties

#### `error_message?`

**Type** : ` string`

The message describing a Distance Matrix API request error. Present only if status is not OK.

#### `rows`

**Type** : ` DistanceMatrixResponseRow[]`

The rows of the matrix, corresponding to the origin locations.

#### `status`

**Type** : ` string`

The status returned. see `woosmap.map.distance.DistanceServiceStatus` {DistanceServiceStatus}

  

## DistanceMatrixResponseRow Interface

A row of the `DistanceMatrixResponse`,consisting of a list of `DistanceMatrixElement`s, one for each corresponding destination locations.

### Properties

#### `elements`

**Type** : ` DistanceMatrixElement[]`

The row’s elements, corresponding to the destination locations.

  

## AddressComponents Interface

### Properties

#### `long_name`

**Type** : ` string`

#### `short_name`

**Type** : ` string`

#### `types`

**Type** : ` string[]`
  

## DeprecatedLocalitiesTypes Interface

Type: `"airport" | "amusement_park" | "art_gallery" | "metro_station" | "museum" | "shopping" | "tourist_attraction" | "train_station" | "zoo" | "point_of_interest"`

## LocalitiesAutocompleteRequest Interface

A Localities autocompletion request to be sent to `LocalitiesService.autocomplete`

### Properties

#### `components?`

**Type** : ` LocalitiesComponentRestrictions`

Used to filter over countries. Countries must be passed as an ISO 3166-1 Alpha-2 or Alpha-3 compatible country code.

#### `customDescription?`

**Type** : ` string`

To set the description format for all or some of the suggestion types selected. see [https://developers.woosmap.com/products/localities/autocomplete/#custom\_description](https://developers.woosmap.com/products/localities/autocomplete/#custom_description)

#### `data?`

**Type** : ` LocalitiesRequestData`

To open suggestions to worldwide postal codes in addition to postal codes for Western Europe.

#### `excluded_types?`

**Type** : ` string`

The types of suggestion to exclude. Multiple types can be passed using the pipe character (|) as a separator. Example: excluded\_types=`suburb|quarter|neighbourhood`

#### `extended?`

**Type** : ` string`

If set, this parameter allows a refined search over locality names that bears the same postal code. possible value is `extended=postal_code`

#### `input`

**Type** : ` string`

The user entered input string.

#### `language?`

**Type** : ` string`

The language code, using ISO 3166-1 Alpha-2 country codes, indicating in which language the results should be returned, if possible. If language is not supplied, the Localities service will use english as default language. No language necessary for `postal_code` request.

#### `location?`

**Type** : ` LatLng`

Location for prediction biasing. The `location` defines the point around which to retrieve predictions in priority.

#### `radius?`

**Type** : ` number`

This parameter may be used in addition to the `location` parameter to define the distance in meters within which the API will return results in priority. Results outside the defined area may still be displayed. Default radius if this parameter is not set is 100 000.

#### `types?`

**Type** : ` string`

The types of predictions to be returned. By default, suggestions return types `locality` and `postal_code`. can be either a single type or a list of `LocalitiesTypes|LocalitiesTypesPoi|LocalitiesTypesPoiAlias` see [https://developers.woosmap.com/products/localities/concepts/locality-types/](https://developers.woosmap.com/products/localities/concepts/locality-types/)

  

## LocalitiesAutocompleteResponse Interface

A Localities Autocomplete response returned by the call to `LocalitiesService.autocomplete` containing a list of `LocalitiesPredictions`.

### Properties

#### `localities`

**Type** : ` LocalitiesPredictions[]`
  

## LocalitiesBounds Interface

Defines a viewport by its geographical coordinates of North-East and South-West corners.

### Properties

#### `northeast`

**Type** : ` LatLngLiteral`

#### `southwest`

**Type** : ` LatLngLiteral`
  

## LocalitiesComponentRestrictions Interface

Restricts predictions to the specified country (ISO 3166-1 Alpha-2 or Alpha-3 compatible country code, case-insensitive). For example, ‘FR’, ‘GB’, or ‘DE’. You can provide a single one, or an array of country code strings.

### Properties

#### `country`

**Type** : ` string`
  

## LocalitiesDetailsAccuracy Interface

Type: `"ROOFTOP" | "DISTRICT" | "POSTAL_CODE" | "ROUTE"`

This accuracy is present when type address is returned. `DISTRICT` and `POSTAL_CODE` are for UK only.

## LocalitiesDetailsGeometry Interface

Details geometry, contains a location and optionally bounds viewport.

### Properties

#### `accuracy`

**Type** : ` LocalitiesDetailsAccuracy`

#### `location`

**Type** : ` LatLngLiteral`

#### `shape?`

**Type** : ` GeoJSONFeature`

#### `viewport?`

**Type** : ` LocalitiesBounds`
  

## LocalitiesDetailsRequest Interface

A Localities details query to be sent to the `LocalitiesService`.

### Properties

#### `countryCodeFormat?`

**Type** : ` "alpha2"`

To specify the format for the short country code expected to be returned in the `address_components` field. Default is the format used to specify `components` or `alpha2` if no components are specified.

#### `fields?`

**Type** : ` string`

If set, it will limit the content of responses to the specified fields. This parameter can be any combination of geometry, address\_components or shape (defaults to geometry|address\_components).

#### `language?`

**Type** : ` string`

The language code, using ISO 3166-1 Alpha-2 country codes, indicating in which language the results should be returned, if possible. If language is not supplied, the Localities service will use english as default language. No language necessary for `postal_code` request.

#### `publicId`

**Type** : ` string`

A textual identifier that uniquely identifies a locality, returned from a `LocalitiesService.autocomplete`.

  

## LocalitiesDetailsResponse Interface

A Localities Details response returned by the call to `LocalitiesService.getDetails` containing a `LocalitiesDetailsResult`.

### Properties

#### `result`

**Type** : ` LocalitiesDetailsResult`
  

## LocalitiesDetailsResult Interface

Defines information about a Locality.

### Properties

#### `address_components?`

**Type** : ` AddressComponents[]`

An array containing Address Components with additional information

#### `administrative_area_label?`

**Type** : ` string`

Only available for admin\_level suggestions, this contains the local english name of the administration level (“department” for France or “federal\_state” for Germany).

#### `formatted_address`

**Type** : ` string`

Contains the readable text description of the result.

#### `geometry?`

**Type** : ` LocalitiesDetailsGeometry`

The location of the result, in latitude and longitude, eventually associated with a Viewport. Accuracy is also provided for locality of type Address.

#### `name?`

**Type** : ` string`

The postal code name if locality is typeof postal\_code

#### `public_id`

**Type** : ` string`

Contains a unique ID for each suggestion.

#### `status?`

**Type** : ` "not_yet_built"`

This optional field is only available for UK addresses referenced as not yey built.

#### `types`

**Type** : ` Array<LocalitiesTypes`

available localities types

  

## LocalitiesDetailsSummary Interface

Human readable description of an address and the unique public\_id of the address

### Properties

#### `description`

**Type** : ` string`

#### `public_id`

**Type** : ` string`
  

## LocalitiesGeocodeGeometry Interface

Defines information about the geometry of a Locality.

### Properties

#### `location`

**Type** : ` LatLngLiteral`

#### `location_type`

**Type** : ` LocalitiesGeocodeLocationType`

#### `shape?`

**Type** : ` GeoJSONFeature`

#### `viewport`

**Type** : ` LocalitiesBounds`
  

## LocalitiesGeocodeLocationType Interface

Type: `"ROOFTOP" | "DISTRICT" | "POSTAL_CODE" | "ROUTE"`

Defines the type of the returned geocoded element.

## LocalitiesGeocodeRequest Interface

A Localities Geocode request to be sent to `LocalitiesService.geocode` Requires an `address` string to perform a geocode request or a `latlng` object for a reverse geocode request.

### Properties

#### `address?`

**Type** : ` string`

The input string to geocode. Can represent an address, a street, a locality or a postal code.

#### `components?`

**Type** : ` LocalitiesComponentRestrictions`

Used to filter over countries. Countries must be passed as an ISO 3166-1 Alpha-2 or Alpha-3 compatible country code.

#### `countryCodeFormat?`

**Type** : ` "alpha2"`

To specify the format for the short country code expected to be returned in the `address_components` field. Default is the format used to specify `components` or `alpha2` if no components are specified.

#### `data?`

**Type** : ` LocalitiesRequestData`

Whether to retrieve suggestions to worldwide postal codes in addition to postal codes for Western Europe.

#### `excluded_types?`

**Type** : ` string`

The types of suggestion to exclude. Multiple types can be passed using the pipe character (|) as a separator. Example: excluded\_types=`suburb|quarter|neighbourhood`

#### `fields?`

**Type** : ` string`

If set, it will limit the content of responses to the specified fields. This parameter can be any combination of geometry, address\_components or shape (defaults to geometry|address\_components).

#### `language?`

**Type** : ` string`

The language code, using ISO 3166-1 Alpha-2 country codes, indicating in which language the results should be returned, if possible. If language is not supplied, the Localities service will use english as default language. No language necessary for `postal_code` request.

#### `latLng?`

**Type** : ` LatLng`

The latLng parameter is used for reverse geocoding, it’s required if the `address` parameter is missing.

#### `list_sub_buildings?`

**Type** : ` boolean`

When latlng parameter is used for reverse geocoding, setting list\_sub\_building=true allows to retrieve all addresses at the same location for a common street number or building.

#### `types?`

**Type** : ` string`

The types of geocoding responses to be returned. By default, suggestions return types `locality`, `postal_code` and `address` can be either a single type or a list of `LocalitiesTypes|LocalitiesTypesPoi|LocalitiesTypesPoiAlias` see [https://developers.woosmap.com/products/localities/concepts/locality-types/](https://developers.woosmap.com/products/localities/concepts/locality-types/)

  

## LocalitiesGeocodeResponse Interface

A Localities Geocode response returned by the call to `LocalitiesService.geocode` containing a list of `LocalitiesGeocodeResult`.

### Properties

#### `results`

**Type** : ` LocalitiesGeocodeResult[]`
  

## LocalitiesGeocodeResult Interface

Defines information about a Geocoded Locality.

### Properties

#### `address_components?`

**Type** : ` AddressComponents[]`

An array containing Address Components with additional information

#### `administrative_area_label?`

**Type** : ` string`

Only available for admin\_level suggestions, this contains the local english name of the administration level (“department” for France or “federal\_state” for Germany).

#### `distance?`

**Type** : ` number`

When reverse geocoding, this field represents the distance (in meters) to the requested latlng

#### `formatted_address`

**Type** : ` string`

Contains the readable text description of the result.

#### `geometry?`

**Type** : ` LocalitiesGeocodeGeometry`

The location of the result, in latitude and longitude, eventually associated with a Viewport. Accuracy is also provided for locality of type Address.

#### `public_id`

**Type** : ` string`

Contains a unique ID for geocoded locality.

#### `scores_per_components?`

**Type** : ` LocalitiesScoresPerComponent`

For each component (street\_name, postal\_code, and locality), it indicates the degree of correspondence with the original query. This value ranges from 0 to 1, with 0 indicating no match with the original query, and enables you to assess the quality of the Geocode’s result.

#### `status?`

**Type** : ` "not_yet_built"`

This optional field is only available for UK addresses referenced as not yey built.

#### `sub_buildings?`

**Type** : ` LocalitiesDetailsSummary[]`

When reverse geocoding with list\_sub\_buildings=true, this field will contain a list of precise addresses that can be found at that location, i.e. all flats within a building.

#### `types`

**Type** : ` LocalitiesTypes[]`

available localities types

  

## LocalitiesGeocodeTypes Interface

Type: `"address" | "locality" | "postal_code" | "route"`

Defines the type of the returned geocoded element.

## LocalitiesNearbyGeometry Interface

Defines information about the geometry of a Locality.

### Properties

#### `location`

**Type** : ` LatLngLiteral`

#### `viewport?`

**Type** : ` LocalitiesBounds`
  

## LocalitiesNearbyPagination Interface

Defines information about the pagination of nearby results.

### Properties

#### `next_page?`

**Type** : ` number`

If more results are available, this will contain the value to pass to the `page` parameter to get the next page.

#### `previous_page?`

**Type** : ` number`

If previous results are available, this will contain the value to pass to the `page` parameter to get the previous page.

  

## LocalitiesNearbyRequest Interface

A Localities Nearby request to be sent to `LocalitiesService.nearby`

### Properties

#### `categories?`

**Type** : ` string`

#### `excluded_types?`

**Type** : ` string`

POI types to exclude from results Example: `business.food_and_drinks.fast_food|business.food_and_drinks.pub`

#### `language?`

**Type** : ` string`

#### `limit?`

**Type** : ` number`

Limit of results per page. (Default is 10, max is 30)

#### `location`

**Type** : ` LatLng`

The center of the search circle.

#### `page?`

**Type** : ` number`

Page number when accessing paginated results.

#### `radius?`

**Type** : ` number`

Define the distance in meters within which the API will return results. Default radius if this parameter is not set is 1000, allowed values are between 10 and 50 000.

#### `types`

**Type** : ` string`

POI types to include (pipe-separated). Example: `business.shop|medical.pharmacy|bank`. To check common POI types refer [https://developers.woosmap.com/products/localities/features/nearby/#common-poi-types](https://developers.woosmap.com/products/localities/features/nearby/#common-poi-types)

  

## LocalitiesNearbyResponse Interface

A Localities Nearby response returned by the call to `LocalitiesService.nearby` containing a list of `LocalitiesNearbyResult`.

### Properties

#### `pagination`

**Type** : ` LocalitiesNearbyPagination`

Helps to navigate through paginated results.

#### `results`

**Type** : ` LocalitiesNearbyResult[]`

The array of nearby results.

  

## LocalitiesNearbyResult Interface

Defines information about a Nearby element.

### Properties

#### `address_components`

**Type** : ` AddressComponents[]`

An array containing Address Components with additional information

#### `categories`

**Type** : ` string[]`

#### `geometry`

**Type** : ` LocalitiesNearbyGeometry`

The location of the result, in latitude and longitude, eventually associated with a Viewport.

#### `name`

**Type** : ` string`

The name of the result.

#### `public_id`

**Type** : ` string`

Contains a unique ID for each result. Please use this ID to give feedbacks on results.

#### `types`

**Type** : ` Array<LocalitiesNearbyTypes`

An array containing the types of the result.

  

## LocalitiesNearbyTypes Interface

Type: `"point_of_interest"`

## LocalitiesPredictions Interface

Represents a single locality prediction

### Properties

#### `description?`

**Type** : ` string`

Concatenation of `name`, `admin_1`, `admin_0` or requested `customDescription`. The description can vary depending on the type requested

#### `has_addresses?`

**Type** : ` boolean`

On the specific territory of United Kingdom, Localities autocomplete request can return the additional attribute `has_addresses` for a postal code, which indicates if a postal code bears addresses. When `has_addresses` is `true`, it is possible to display a list of the available addresses by requesting details with the Localities `public_id`.

#### `matched_substrings?`

**Type** : ` MatchedSubstring`

Contains a set of substrings for each field that match elements in the input. It can be used to highlight those substrings.

#### `public_id`

**Type** : ` string`

Contains a unique ID for locality. This ID is required to perform `LocalitiesService.getDetails` request.

#### `related?`

**Type** : ` LocalitiesRelated`

Contains the related information for the prediction.

#### `type?`

**Type** : ` LocalitiesTypes`

#### `types?`

**Type** : ` Array<LocalitiesTypes`

An array containing the types of the result.

  

## LocalitiesRelated Interface

Represents related components information for a prediction.

### Properties

#### `postal_codes?`

**Type** : ` LocalitiesRelatedPostalCode[]`

Contains related Postal Codes information.

  

## LocalitiesRelatedPostalCode Interface

Represents a related postal code information for a prediction.

### Properties

#### `description`

**Type** : ` string`

Contains the related Postal Code formatted description string.

#### `public_id`

**Type** : ` string`

Contains the related Postal Code public ID.

  

## LocalitiesRequestData Interface

Type: `"standard" | "advanced"`

The `advanced` value opens suggestions to worldwide postal codes in addition to postal codes for Western Europe. default to `standard`

## LocalitiesScoresPerComponent Interface

For each component (street\_name, postal\_code, and locality), it indicates the degree of correspondence with the original query. This value ranges from 0 to 1, with 0 indicating no match with the original query, and enables you to assess the quality of the Geocode’s result.

### Properties

#### `locality`

**Type** : ` number`

#### `postal_code`

**Type** : ` number`

#### `street_name`

**Type** : ` number`
  

## LocalitiesTypes Interface

Type: `DeprecatedLocalitiesTypes | "country" | "admin_level" | "postal_code" | "address" | "route" | "locality" | "city" | "town" | "village" | "hamlet" | "borough" | "suburb" | "quarter" | "neighbourhood"`

The types of suggestion to return. By default, suggestions return types `locality` and `postal_code`. Check [full list of supported types](https://developers.woosmap.com/products/localities/autocomplete/#types)

## LocalitiesTypesPoi Interface

Type: `"point_of_interest" | "transit.station" | "transit.station.airport" | "transit.station.rail" | "beach" | "business" | "business.car_repair" | "business.car_rental" | "business.cinema" | "business.conference_centre" | "business.exhibition_centre" | "business.theatre" | "business.nightclub" | "business.finance" | "business.finance.bank" | "business.fuel" | "business.parking" | "business.mall" | "business.food_and_drinks" | "business.food_and_drinks.bar" | "business.food_and_drinks.biergarten" | "business.food_and_drinks.cafe" | "business.food_and_drinks.fast_food" | "business.food_and_drinks.pub" | "business.food_and_drinks.restaurant" | "business.food_and_drinks.food_court" | "business.shop" | "business.shop.mall" | "business.shop.bakery" | "business.shop.butcher" | "business.shop.library" | "business.shop.grocery" | "business.shop.sports" | "business.shop.toys" | "business.shop.clothes" | "business.shop.furniture" | "business.shop.electronics" | "business.shop.doityourself" | "business.shop.craft" | "education" | "education.school" | "education.kindergarten" | "education.university" | "education.college" | "education.library" | "hospitality" | "hospitality.hotel" | "hospitality.hostel" | "hospitality.guest_house" | "hospitality.bed_and_breakfast" | "hospitality.motel" | "medical" | "medical.hospital" | "medical.pharmacy" | "medical.clinic" | "tourism" | "tourism.attraction" | "tourism.attraction.amusement_park" | "tourism.attraction.zoo" | "tourism.attraction.aquarium" | "tourism.monument" | "tourism.monument.castle" | "tourism.museum" | "government" | "park" | "park.national" | "place_of_worship" | "police" | "post_office" | "sports" | "sports.golf" | "sports.winter"`

Categories of points of interest (POI) supported for detailed classification in geographic data queries. Refer [supported POI types][https://developers.woosmap.com/products/localities/concepts/locality-types/#point-of-interest-types](https://developers.woosmap.com/products/localities/concepts/locality-types/#point-of-interest-types)

## LocalitiesTypesPoiAlias Interface

Type: `"airport" | "train_station" | "transit.station" | "metro_station" | "shopping" | "museum" | "zoo" | "amusement_park" | "art_gallery" | "tourist_attraction"`

POI aliases

## Store Interface

Defines information about a Store.

### Properties

#### `address`

**Type** : ` StoreAddress`

Defines an object containing the separate components applicable to this address.

#### `contact`

**Type** : ` StoreContact`

Defines an object containing the store’s contact available information.

#### `distance?`

**Type** : ` number`

Defines the distance in meters from the position if you set `lat` and `lng` in your `StoresSearchRequest`.

#### `lastUpdated`

**Type** : ` string`

Defines the previous date timestamp when the store has been updated

#### `name`

**Type** : ` string`

the store’s name

#### `open`

**Type** : ` StoreOpen`

The current opening status for a store

#### `opening_hours`

**Type** : ` StoreOpeningHours`

Defines the opening hours of a store.

#### `store_id`

**Type** : ` string`

A textual identifier that uniquely identifies a store

#### `tags`

**Type** : ` string[]`

Contains an array of tags describing the store.

#### `types`

**Type** : ` string[]`

Contains an array of types describing the store.

#### `user_properties`

**Type** : ` any`

Contains all additional information relative to a store. No restriction regarding the types of data in it (Arrays, Object, Boolean, String, Numeric…) but you can only query for text matching, numerical comparison or boolean.

#### `weekly_opening`

**Type** : ` StoreWeeklyOpening`

The current Weekly Opening taking into account the special hours

  

## StoreAddress Interface

Defines information about a store address.

### Properties

#### `city?`

**Type** : ` string`

A city where belongs a store

#### `country_code?`

**Type** : ` string`

An ISO\_3166-1 Country Code where the store is located(see [https://en.wikipedia.org/wiki/ISO\_3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) for full list)

#### `lines?`

**Type** : ` string[]`

An array for lines of a store Address

#### `zipcode?`

**Type** : ` string`

A Zipcode / Postal code of a store address

  

## StoreContact Interface

Defines information about a store contact.

### Properties

#### `email`

**Type** : ` string`

Contains the store’s email contact.

#### `phone`

**Type** : ` string`

Contains the store’s phone number in its local format.

#### `website`

**Type** : ` string`

The website contact for this store, such as a business’ homepage.

  

## StoreOpen Interface

Defines the current opening status for a store

### Properties

#### `current_slice`

**Type** : ` StoreOpeningHoursPeriod`

#### `next_opening?`

**Type** : ` StoreOpenNextOpening`

#### `open_hours`

**Type** : ` StoreOpeningHoursPeriod[]`

#### `open_now`

**Type** : ` boolean`

Defines if the store is currently opened.

#### `week_day?`

**Type** : ` number`

Represents the day number of the week. possible values are: `1 | 2 | 3 | 4 | 5 | 6 | 7`

  

## StoreOpenNextOpening Interface

Defines the next opening hours period

### Properties

#### `day`

**Type** : ` string`

#### `end`

**Type** : ` string`

#### `start`

**Type** : ` string`
  

## StoreOpeningHours Interface

Describes the opening hours of a store.

### Properties

#### `special`

**Type** : ` any`

Defines the special opening hours of a store. The format for defining opening and closing hours for a particular day is the same as the usual. Instead of using numeric week day for keys you must use a date YYYY-MM-DD like “2015-03-08” example: `special:{“2015-03-08”: {start:”14:00”, end:”16:00”}}

#### `timezone`

**Type** : ` string`

Timezone for the Opening Hours of a store. It is used to compute the `open_now` property of an asset. see [https://en.wikipedia.org/wiki/List\_of\_tz\_database\_time\_zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)

#### `usual`

**Type** : ` StoreOpeningHoursUsual`

Defines the usual opening hours of a store.

  

## StoreOpeningHoursPeriod Interface

Defines the hours for an opening period. To set a slice of time when the asset is open you must define a `start` and `end` keys. `start` and `end` must belong to the same day (crossing midnight may result in `open_now` being always `false`.)

### Properties

#### `'all-day'?`

**Type** : ` boolean`

#### `end`

**Type** : ` string`

#### `start`

**Type** : ` string`
  

## StoreOpeningHoursUsual Interface

Defines the usual opening hours of a store. The key defines the day number. It can be from “1” for monday up to “7” for sunday.

### Properties

#### `'1'?`

**Type** : ` StoreOpeningHoursPeriod[]`

#### `'2'?`

**Type** : ` StoreOpeningHoursPeriod[]`

#### `'3'?`

**Type** : ` StoreOpeningHoursPeriod[]`

#### `'4'?`

**Type** : ` StoreOpeningHoursPeriod[]`

#### `'5'?`

**Type** : ` StoreOpeningHoursPeriod[]`

#### `'6'?`

**Type** : ` StoreOpeningHoursPeriod[]`

#### `'7'?`

**Type** : ` StoreOpeningHoursPeriod[]`

#### `default?`

**Type** : ` StoreOpeningHoursPeriod[]`
  

## StorePrediction Interface

Represents a single store prediction.

### Properties

#### `highlighted?`

**Type** : ` number`

#### `matched_substrings?`

**Type** : ` AutocompleteMatchedSubstring[]`

#### `name`

**Type** : ` string`

#### `store_id`

**Type** : ` string`

#### `types`

**Type** : ` string[]`
  

## StoreResponse Interface

A Store Response as a GeoJSON Feature Object returned by the call to `StoresService.getStoreById`

### Properties

#### `geometry`

**Type** : ` GeoJSONPoint`

Defines the geometry of a store

#### `properties`

**Type** : ` Store`

Defines attributes of a Store

#### `type`

**Type** : ` "Feature"`
  

## StoreWeeklyOpening Interface

Defines the current Weekly Opening taking into account the special hours. The key defines the day number. It can be from “1” for monday up to “7” for sunday.

### Properties

#### `'1'?`

**Type** : ` StoreWeeklyOpeningHoursPeriod`

#### `'2'?`

**Type** : ` StoreWeeklyOpeningHoursPeriod`

#### `'3'?`

**Type** : ` StoreWeeklyOpeningHoursPeriod`

#### `'4'?`

**Type** : ` StoreWeeklyOpeningHoursPeriod`

#### `'5'?`

**Type** : ` StoreWeeklyOpeningHoursPeriod`

#### `'6'?`

**Type** : ` StoreWeeklyOpeningHoursPeriod`

#### `'7'?`

**Type** : ` StoreWeeklyOpeningHoursPeriod`

#### `timezone`

**Type** : ` string`
  

## StoreWeeklyOpeningHoursPeriod Interface

Defines the weekly opening hours of a store.

### Properties

#### `hours`

**Type** : ` StoreOpeningHoursPeriod[]`

#### `isSpecial`

**Type** : ` boolean`

Define if the hours comes from a special opening hours’ day.

  

## StoresAutocompleteRequest Interface

A Stores Autocomplete request to be sent to `StoresService.autocomplete` containing a search query as string with `localized` field to autocomplete stores on `localizedNames`.

### Properties

#### `language?`

**Type** : ` string`

The preferred language to match against name (defaults on Accept-Language header)

#### `limit?`

**Type** : ` number`

Limits the number of autocomplete results (default 5, max 50).

#### `query?`

**Type** : ` string`

Example: `query=name:'My cool store'|type:'click_and_collect'` Search query combining one or more search clauses. Each search clause is made up of three parts structured as `field : operator value`. example: `name:="My cool store"`

  

## StoresAutocompleteResponse Interface

A Stores Autocomplete response returned by the call to `StoresService.autocomplete` containing a list of `StorePrediction`.

### Properties

#### `predictions`

**Type** : ` StorePrediction[]`

list of `StorePrediction`.

  

## StoresBoundsRequest Interface

A Stores Bounds request to be sent to `StoresService.getBounds`

### Properties

#### `latLng?`

**Type** : ` LatLng`

To bias the results around a specific latlng

#### `query?`

**Type** : ` string`

Example: `query=name:'My cool store'|type:'click_and_collect'` Search query combining one or more search clauses. Each search clause is made up of three parts structured as `field : operator value`. example: `name:="My cool store"`

#### `radius?`

**Type** : ` number`

To bias the results within a given circular area. Unit in meters

  

## StoresBoundsResponse Interface

A Stores Bounds response returned by the call to `StoresService.getBounds` and containing the bounds of searched stores.

### Properties

#### `bounds`

**Type** : ` LatLngBoundsLiteral`
  

## StoresSearchRequest Interface

A Stores Search request to be sent to `StoresService.search` containing a search query as string to autocomplete stores on.

### Properties

#### `latLng?`

**Type** : ` LatLng`

To bias the results around a specific latlng

#### `page?`

**Type** : ` number`

Page number when accessing paginated stores

#### `polyline?`

**Type** : ` string`

Find stores nearby an encoded polyline and inside a defined radius. The polyline as string is expected to be a google-encoded polyline.

#### `query?`

**Type** : ` string`

Example: `query=name:'My cool store'|type:'click_and_collect'` Search query combining one or more search clauses. Each search clause is made up of three parts structured as `field : operator value`. example: `name:="My cool store"`

#### `radius?`

**Type** : ` number`

To bias the results within a given circular area. Unit in meters

#### `storesByPage?`

**Type** : ` number`

If your request returns a high number of stores, the result will be paginated. You can then request stores by page using `page` and `storesByPage` parameters (Default is 100, max is 300).

#### `zone?`

**Type** : ` boolean`

whether to search for stores intersecting a zone

  

## StoresSearchResponse Interface

A Stores Search response as a GeoJSON FeatureCollection Object returned by the call to `StoresService.search` and containing a list of `StoreResponse`.

### Properties

#### `features`

**Type** : ` StoreResponse[]`

list of `StoreResponse` features

#### `pagination`

**Type** : ` Pagination`

Pagination to reach all returned assets. max 300 assets par page.

#### `type`

**Type** : ` "FeatureCollection"`
  

## TransitAttribution Interface

When TransitAttribution is valued it’s content must be shown to the end user.

### Properties

#### `href`

**Type** : ` string`

A link to the transport network operator

#### `id`

**Type** : ` string`

Identifier for the attribution

#### `text`

**Type** : ` string`

The text to show to the user

#### `type`

**Type** : ` string`

Type of attribution

  

## TransitLeg Interface

A leg represents a part of the route using a single transport mode.

### Properties

#### `bounds`

**Type** : ` LatLngBounds`

The bounds of the leg

#### `decodedPolyline`

**Type** : ` LatLng[]`

The decoded polyline for the leg.

#### `distance`

**Type** : ` number`

The leg length in meters

#### `duration`

**Type** : ` number`

The leg duration in seconds.

#### `end_location`

**Type** : ` TransitPlace`

The ending location of the leg

#### `polyline`

**Type** : ` string`

#### `start_location`

**Type** : ` TransitPlace`

The starting location of the leg

#### `transport`

**Type** : ` TransitTransport`

The transport used for the leg

#### `travel_mode`

**Type** : ` "pedestrian"`

The travel mode for the leg

  

## TransitPlace Interface

### Properties

#### `location`

**Type** : ` LatLngLiteral`

Location coordinates of the place

#### `name`

**Type** : ` string`

Name of the place can be null if no place could be identified for the user-provided coordinates (origin or destination)

#### `type`

**Type** : ` string`

Type of the place

  

## TransitRoute Interface

A transit route composed of multiple TransitLeg, a leg represents a part of the route using a single transport mode. A list of transit and pedestrian list of the route.

### Properties

#### `bounds`

**Type** : ` LatLngBounds`

The bounds for the route, union of the leg bounds.

#### `duration`

**Type** : ` number`

Duration of the route in seconds

#### `legs`

**Type** : ` TransitLeg[]`

The legs for the route

#### `notice`

**Type** : ` string`
  

## TransitRouteRequest Interface

A Transit request to be sent to `TransitService.route``arrivalTime` and `departureTime` are mutually exclusive, if both of them are valued only `departureTime` will be used.

### Properties

#### `arrivalTime?`

**Type** : ` string`

When the travel is expected to finish should be a string encoded timestamp or a string encoded date.

#### `departureTime?`

**Type** : ` string`

When the travel is expected to start, should be a string encoded timestamp or a string encoded date.

#### `destination`

**Type** : ` LatLng`

The destination of the trip

#### `modes?`

**Type** : ` string[]`

Transit mode filter used to determine which modes of transit to include in the response. By default, all supported transit modes are permitted. Supported modes: `highSpeedTrain` `intercityTrain` `interRegionalTrain` `regionalTrain` `cityTrain` `bus` `ferry` `subway` `lightRail` `privateBus` `inclined` `aerial` `busRapid` `monorail` `flight` `spaceship` This parameter also support an exclusion list: It’s sufficient to specify each mode to exclude by prefixing it with -. Mixing of inclusive and exclusive transit modes is not allowed.

#### `origin`

**Type** : ` LatLng`

The origin of the trip

  

## TransitRouteResponse Interface

### Properties

#### `routes`

**Type** : ` TransitRoute[]`

The routes.

#### `status`

**Type** : ` "OK"`

The status of the response

  

## TransitTransport Interface

### Properties

#### `attributions`

**Type** : ` TransitAttribution[]`

The attribution for this transport, when valued must be shown to user. This can be added at the end of the road book

#### `category`

**Type** : ` string`

The category, rail, bus …

#### `color`

**Type** : ` string`

The color used to draw polylines.

#### `headsign`

**Type** : ` string`

#### `long_name`

**Type** : ` string`

#### `mode`

**Type** : ` "pedestrian"`

The mode of transportation

#### `name`

**Type** : ` string`

Name of the transport (transit line name for example)

#### `short_name`

**Type** : ` string`

#### `text_color`

**Type** : ` string`

Color that can be used to draw line text

  

## DirectionStatus Enum

### Constants

#### `OK`
  

## MapTypeId Enum

Identifiers for common map types. Specify these by value, or by using the constant’s name. For example, `'roadmap'` or `woosmap.map.MapTypeId.ROADMAP`.

### Constants

#### `HYBRID`

Displays a satellite image with road and label overlay.

#### `ROADMAP`

Displays the default road map view.

  

## TravelMode Enum

The valid travel modes that can be specified in a `DistanceRouteRequest`, `DistanceMatrixRequest` or `DistanceIsochroneRequest`. Specify these by value, or by using the constant’s name. For example, `'WALKING'` or `woosmap.map.TravelMode.WALKING`

### Constants

#### `BICYCLING`

Defines a cycling route request.

#### `DRIVING`

Defines a driving route request.

#### `WALKING`

Defines a walking route request.

  

## UnitSystem Enum

The valid unit systems that can be specified in a `DistanceRouteRequest`, `DistanceMatrixRequest` or `DistanceIsochroneRequest`.

### Constants

#### `IMPERIAL`

Requests distances to be computed using the imperial system.

#### `METRIC`

Requests distances to be computed using the metric system.

  

## DistanceServiceStatus Enum

The status returned by the `DistanceService` on the resolve of its searches. Specify these by value, or by using the constant’s name. For example, `'OK'` or `woosmap.map.distance.DistanceServiceStatus.OK`.

### Constants

#### `BACKEND_ERROR`

The `DistanceSerivce` request could not be processed due to a server error. This may indicate that the origin and/or destination of this pairing could not be matched to the network. The request may or may not succeed if you try again.

#### `INVALID_REQUEST`

The provided request was invalid.

#### `MAX_ELEMENTS_EXCEEDED`

The product of origins and destinations exceeds the 200 elements per-query limit.

#### `MAX_ROUTE_LENGTH_EXCEEDED`

For Distance matrix or isochrone, it means that of computed routes exceeds the maximum of 500km route length. For DistanceRoute, it means that the computed route exceeds the maximum of 1000km route length.

#### `OK`

The response contains a valid result.

#### `OVER_QUERY_LIMIT`

The application has gone over its request quota.

#### `REQUEST_DENIED`

The application is not allowed to use the `DistanceService`.

  

## BoolOperators Enum

Represents Query Boolean operators.

### Constants

#### `AND`

And boolean operator

#### `NOT`

Not boolean operator

#### `OR`

Or boolean operator

  

## Operators Enum

Represents Query operators.

### Constants

#### `gt`

Greater-than operator

#### `gte`

Greater-than-or-equal-to operator

#### `lt`

Less-than operator

#### `lte`

Less-than-or-equal-to operator

  

## woosmap.map.event Namespace

### Functions

#### `addListener`

`addListener(instance, eventName, handler)`

**Parameters:**
- `instance`: `Object` 
- `eventName`: `string` 
- `handler`: `Function` 

**Return Type** : `MapEventListener`

Adds the given listener function to the given event name for the given object instance. Returns an identifier for this listener that can be used with `removeListener()`.

#### `addListenerOnce`

`addListenerOnce(instance, eventName, handler)`

**Parameters:**
- `instance`: `Object` 
- `eventName`: `string` 
- `handler`: `Function` 

**Return Type** : `MapEventListener`

Like addListener, but the handler removes itself after handling the first event.

#### `addDomListener`

`addDomListener(element, eventName, handler)`

**Parameters:**
- `element`: `Element` 
- `eventName`: `string` 
- `handler`: `Function` 

**Return Type** : `void`

#### `removeListener`

`removeListener(listener)`

**Parameters:**
- `listener`: `MapEventListener` 

**Return Type** : `void`

Removes the given listener, which should have been returned by addListener above. Equivalent to calling `listener.remove()`.

#### `clearInstanceListeners`

`clearInstanceListeners(instance)`

**Parameters:**
- `instance`: `Object` 

**Return Type** : `void`

Removes all listeners for all events for the given instance.

#### `clearListeners`

`clearListeners(instance, eventName)`

**Parameters:**
- `instance`: `Object` 
- `eventName`: `string` 

**Return Type** : `void`

Removes all listeners for the given event for the given instance.

#### `trigger`

`trigger(instance, eventName, eventArgs?)`

**Parameters:**
- `instance`: `Object` 
- `eventName`: `string` 
- `eventArgs`: `(any[] | null)` 

**Return Type** : `void`

Triggers the given event. All arguments after eventName are passed as arguments to the listeners.

  

## woosmap.map.geometry Namespace

### Functions

#### `containsLocation`

`containsLocation(point, polygon)`

**Parameters:**
- `point`: `LatLng` 
- `polygon`: `Polygon` 

**Return Type** : `boolean`

Computes whether the given point lies inside the specified polygon.

#### `isLocationOnEdge`

`isLocationOnEdge(point, poly, tolerance?)`

**Parameters:**
- `point`: `LatLng` 
- `poly`: `Polygon` 
- `tolerance`: `number` 

**Return Type** : `boolean`

Computes whether the given point lies on or near to a polyline, or the edge of a polygon, within a specified tolerance. Returns true when the difference between the latitude and longitude of the supplied point, and the closest point on the edge, is less than the tolerance. The tolerance defaults to 10-9 degrees.

  

## woosmap.map.query Namespace

### Functions

#### `F`

`F(key, value, operator?)`

**Parameters:**
- `key`: `string` 
- `value`: `string` 
- `operator`: `(Operators | null)` 

**Return Type** : `Field`

Function helper to instantiate a Field or an array of Fields, used to form queries. If value is an array, it will create a Field for each item in the array.

#### `and`

`and(...children)`

**Parameters:**
- `...children`: `Array<Query` 

**Return Type** : `Query`

Helper function to instantiate a Query with AND connector

#### `or`

`or(...children)`

**Parameters:**
- `...children`: `Array<Query` 

**Return Type** : `Query`

Helper function to instantiate a Query with OR connector

#### `not`

`not(child)`

**Parameters:**
- `child`: `Query` 

**Return Type** : `Query`

Helper function to instantiate a negated Query
