Interface OverpassApiVectorSourceOptions

These are properties for Overpass API vector source.

interface OverpassApiVectorSourceOptions {
    additionalOptions?: Options<Feature<Geometry>>;
    baseUrl: string;
    mapProjection: ProjectionLike;
    query: string;
    rewriteUrl?: (url: URL) => undefined | URL;
    timeout?: number;
}

Properties

additionalOptions?: Options<Feature<Geometry>>

Optional additional options for the VectorSource.

baseUrl: string

The base-URL to an Overpass API instance (e.g. https://overpass-api.de/api/interpreter).

mapProjection: ProjectionLike

Current map projection (e.g. EPSG:3857)

query: string

Overpass API query part (e.g. node[amenity=post_box];).

rewriteUrl?: (url: URL) => undefined | URL

Use this function to rewrite the URL used to fetch features from an Overpass API service.

NOTE: Do not update the url argument. Return a new URL instance instead.

NOTE: Be careful with existing URL parameters. The vector source may not work correctly if predefined parameters are overwritten. The vector source might add additional parameters to its request URLs in the future.

timeout?: number

Request delay (in milliseconds) before the async query starts. Defaults to 25.