options to configure the provider
The id of the Provider
default tile margin.
The name of the Provider.
Add an EventListener to the provider. Valid events: "featureAdd", "featureRemove", "featureCoordinatesChange", "clear" and "error"
The detail property of the Event gives additional information about the event. detail.provider is a reference to the provider onto which the event was dispatched and is set for all events.
A string representing the event type to listen for
the listener function that will be called when an event of the specific type occurs
Add a feature to the provider.
the feature to be added to the provider
Add multiple features to the provider.
the features to be added to the provider
Get all the features that are currently present in the provider.
Clears the given tile(s) from the provider's cache.
Clears all tiles within a specified geographical bounding box.
An array of geographical coordinates [minLon, minLat, maxLon, maxLat]
defining the rectangular area from which tiles will be cleared.
Clears all cached tiles of the provider.
Set config for provider.
options to set
Create a new Tile.
the quadkey of the tile to create
Finds the optimal path between two coordinates on a GeoJSON road network, considering various options. By default, the weight function returns the distance of the road segment, a lower distance implies a shorter route and is considered more favorable. If you have specific criteria such as road quality, traffic conditions, or other factors influencing the desirability of a road segment, you can customize the weight function accordingly. Pathfinding will consider only the locally cached data available on the client.
The options object containing parameters for finding the path.
Optional callback function to determine if a turn is allowed between road segments. If not provided, all turns are considered allowed.
Object representing the source road segment of the turn.
Index of the Coordinates array of the source road segment.
GeoJSON Feature representing the source road segment.
Object representing the destination road segment of the turn.
Index of the Coordinates array of the destination road segment.
GeoJSON Feature representing the destination road segment.
The starting coordinates defining the path.
The ending coordinates of the path.
Optional callback function to determine the weight (cost) of traversing a road segment.
Direction of traversal on the road segment.
The Distance of the road in meters.
Feature representing the road segment.
Starting coordinates of the road segment.
Ending coordinates of the road segment.
{Promise<{
features: Feature[];
readonly path: GeoJSONFeature
Get a locally cached tile by quadkey.
the quadkey of the tile
Retrieves cached tiles within a specified bounding box or all cached tiles if no parameters are provided.
If no arguments are passed, all cached tiles are returned.
If a bounding box (bbox
) and/or zoom level (zoomlevel
) are provided, it filters the cached tiles based on the specified area and zoom level.
An optional array of coordinates defining the bounding box in the format: [minLon, minLat, maxLon, maxLat]
.
If provided, only tiles within this geographic area will be returned.
An optional zoom level to filter tiles. If provided, only tiles at the specified zoom level will be returned.
Gets a feature from the provider by id.
the id of the feature
the found feature or undefined if feature is not present.
Remove an EventListener from the provider. Valid events: "featureAdd", "featureRemove", "featureCoordinatesChange", "clear" and "error"
A string which specifies the type of event for which to remove an event listener.
The listener function of the event handler to remove from the provider.
Remove feature(s) from the provider.
features that should be removed from the provider
Search for feature(s) in the provider.
configure the search
search feature by id.
Array of feature ids to search.
Geographical center point of the point to search in. options.radius must be defined.
Radius of the point in meters, it is used in "point" search.
Geographical Rectangle to search in. [minLon, minLat, maxLon, maxLat] | GeoRect.
array of features
Point Search for feature(s) in provider.
Geographical center point of the point to search in. options.radius must be defined.
configure the search
The radius of the circular area in meters to search in.
Rectangle Search for feature(s) in provider.
Geographical Rectangle to search in. [minLon, minLat, maxLon, maxLat] | GeoRect.
Search for feature by id in the provider.
id of the feature to search for
Modify coordinates of a feature in the provider.
the Feature whose coordinates should be modified/updated
the modified coordinates to set. The coordinates must match features geometry type.
Set the tile margin in pixel.
the tileMargin
Generated using TypeDoc
Feature provider.