# hidePoi

Command (Map).

Remove specific Poi(s) from MapView, destroy their associated PoiStyle if not in use anymore

Removes specific points from the map by id, leaving the rest in place. Used when part of what is
displayed stops being relevant (a collection already made, a site closed for the day) without
redrawing everything.

**Worth knowing**

- It succeeds if at least one of the ids was found; unknown ids are ignored. Only if none of them
  match does it return `14 poi.not.found`.
- The list must not be empty: use [`hideAllPois`](https://docs.benomad.com/benav-rnc/commands/hide-all-pois.md) to clear everything.

## Command

```json
{
    "jsonrpc": "2.0",
    "method": "hidePoi",
    "id": "test_hide",
    "params": {
        "ids": [
            "beach_beau_rivage",
            "TEST",
            "castle_hill_complete",
            "restaurant_garibaldi"
        ]
    }
}
```

Specific Parameters:

- `ids` List of unique Poi identifiers given as `id` in the [`showPoi`](https://docs.benomad.com/benav-rnc/commands/show-poi.md) command

  - Must be **non-empty**. An empty array returns `-32700 parse.error`. To remove every POI use [`hideAllPois`](https://docs.benomad.com/benav-rnc/commands/hide-all-pois.md), or [`showPoi`](https://docs.benomad.com/benav-rnc/commands/show-poi.md) with an empty `pois` list.

## Response

### Success

```json
{
  "id": "test_hide",
  "jsonrpc": "2.0",
  "result": {}
}
```

Success response will be sent if one or more poi is hidden by the command, even if the others ids don't exist.

### Error

If not a single id is found

```json
{
    "error": {
        "code": 14,
        "message": "poi.not.found"
    },
    "id": "test_hide_single",
    "jsonrpc": "2.0"
}
```
