Class: NearPoiResponse

bemap.NearPoiResponse(optionsopt)

new NearPoiResponse(optionsopt)

BeNomad BeMap JavaScript API - NearPoiResponse Container for the list of `NearPoint` items returned by `bemap.NearPoiSearch.nearPoi()`. Wire shape from the BeMap server — confirmed by a real `POST service/nearpoi/1.0` response on bemap-beta.benomad.com: { "pois": [ { coordinate: {lon, lat}, distance, duration, type, name, telephone }, ... ] } `fromJson` reads `pois` first, then tolerates a bare root array and the `points` / `items` / `results` wrappers as fallbacks, so consumer code survives if the server tweaks the field name.
Parameters:
Name Type Attributes Description
options Object <optional>
Properties
Name Type Attributes Description
points Array.<bemap.NearPoint> <optional>
Since:
  • 1.5.0
Source:

Methods

getPointsByType(typeOrTypes) → {Array.<bemap.NearPoint>}

Convenience: return only POIs whose `type` matches one of the values in the supplied list. Pass a single string or an Array of strings.
Parameters:
Name Type Description
typeOrTypes String | Array.<String>
Source:
Returns:
Type
Array.<bemap.NearPoint>