Skip to content

clarify geometry-type expression behavior for vector tile sources #7699

@samanpwbb

Description

@samanpwbb

Problem

The documentation for geometry-type in the spec (

"doc": "Gets the feature's geometry type: Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon.",
) could clarify which property types will be available for which source types. Current copy is:

Gets the feature's geometry type: Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon.

Based on a quick experiment, it doesn't appear like the geometry-type expression ever returns a multi* feature when applied to a vector tile source.

Suggestion

There's likely more nuance going on here than I'm aware of – in which case, the appropriate explanation in the appropriate place would solve this issue better than anything I can come up with. Here are some suggestions based on what I know:

  • Add a sentence to the spec documentation, something like: "Multi* feature types will only be detectable in GeoJSON sources, use the singular forms when working with vector tile sources".
  • Change the behavior of geometry-type to return true for multi-features in both vector tile and GeoJSON source types.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions