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.
Problem
The documentation for
geometry-typein the spec (mapbox-gl-js/src/style-spec/reference/v8.json
Line 2738 in 64ebdda
Based on a quick experiment, it doesn't appear like the
geometry-typeexpression 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:
geometry-typeto return true for multi-features in both vector tile and GeoJSON source types.