Mapbox-gl-js: Allow rendering MultiPoint GeoJSON features as 'line' or 'fill' map features

Created on 26 Aug 2016  路  2Comments  路  Source: mapbox/mapbox-gl-js

mapbox-gl-js version: 0.19-0.23

Steps to Trigger Behavior

1 - Create MultiPoint GeoJSON:

{
  "type": "FeatureCollection",
  "features": [{
    "properties": {},
    "type": "Feature",
    "geometry": {
      "type": "MultiPoint",
      "coordinates": [
        [-73, 45],
        [-76, 46],
        [-75, 47]
      ]
    }
  }]
}

2 - Render that GeoJSON as a type: 'line' layer

See codepen: http://codepen.io/chriddyp/pen/EyBGzg?editors=1010

Expected Behavior

Layer with type set to fill, line, or symbol would be visible

Actual Behavior

Layer is not visible.

Note

This layer _was_ visible up through version 0.18. Screenshot:
image

Here in version 0.23:
image

Most helpful comment

I don't think this is technically possible or something that we should do. MultiPoint is clipped differently than LineString. I would suggest changing the type in the input data rather than hacking around it in the Mapbox GL JS core or geojson-vt.

All 2 comments

@mourner Any thoughts about this from a GeoJSON semantics or geojson-vt perspective?

I don't think this is technically possible or something that we should do. MultiPoint is clipped differently than LineString. I would suggest changing the type in the input data rather than hacking around it in the Mapbox GL JS core or geojson-vt.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aderaaij picture aderaaij  路  3Comments

rigoneri picture rigoneri  路  3Comments

muesliq picture muesliq  路  3Comments

iamdenny picture iamdenny  路  3Comments

aaronlidman picture aaronlidman  路  3Comments