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
|
- Since:
- Source:
Convenience: return only POIs whose `type` matches one of the values in
the supplied list. Pass a single string or an Array of strings.