Class: GeocodingRequest

bemap.GeocodingRequest(optionsopt)

new GeocodingRequest(optionsopt)

BeNomad BeMap JavaScript API - GeocodingRequest Typed request object for `bemap.Geocoder.geocode(request)`. Carrying a dedicated class (rather than a free-form `options` object) is the marker the refreshed Geocoder uses to decide between the Promise-based v1.5 path and the legacy callback-based path — see `bemap-geocoder-v2.js`. The class is intentionally tolerant: every field is optional and the server validates the combination. Fluent setters return `this` so the request can be built in one expression.
Parameters:
Name Type Attributes Description
options Object <optional>
Properties
Name Type Attributes Default Description
place String <optional>
Free-text input ("100 rue de Rivoli, Paris").
address bemap.Address <optional>
Structured input (alternative to `place`).
searchType String <optional>
One of `bemap.GeocodingSearchType.*`.
assetType String <optional>
One of `bemap.AssetSearchType.*`.
language String <optional>
BCP-47 language code (e.g. 'fr', 'en-US').
maxResult Number <optional>
10
boundingBox bemap.BoundingBox <optional>
Restrict the lookup to a bbox.
proximity bemap.Coordinate <optional>
Bias the lookup to results near this point.
addressDetails Boolean <optional>
true Include the full PostalAddress in results.
Since:
  • 1.5.0
Source:

Methods

toJson() → {Object}

Serialise the request to the JSON shape posted to the BeMap geocoding endpoint. `null` fields are stripped.
Source:
Returns:
Type
Object