maplibre / maplibre-gl-inspect

Maplibre GL Inspect adds an inspect control to maplibre-gl-js to view all features of the vector sources and allows hovering over features to see their properties.
https://maplibre.org/maplibre-gl-inspect/
BSD 3-Clause "New" or "Revised" License
40 stars 7 forks source link

Show the `id` of MVT features #50

Closed zstadler closed 5 months ago

zstadler commented 5 months ago

An MVT feature can have 4 components:

4.2. Features

A feature MUST contain a geometry field.

A feature MUST contain a type field as described in the Geometry Types section.

A feature MAY contain a tags field. Feature-level metadata, if any, SHOULD be stored in the tags field.

A feature MAY contain an id field. If a feature has an id field, the value of the id SHOULD be unique among the features of the parent layer.

The first 3 components are shown in the maplibge-gl-inspect popup, but the id component is not. id is available for use by the MapLibre Style and the API. Not being able to inspect it is a barrier for id-related debug of vector tiles.

Please add the id to the contents of the default pop-up, perhaps as $id, similar to $type.