Search code examples
javascriptgeojsonmapbox-gl-js

Is MultiLineString geoJSON feature type supported by mapbox-gl?


When i try to add source with MultiLineString to 'line' layer nothing is rendered. No errors, no lines.

After i transformed MultiLineString features into LineString features lines rendered successfully.


Solution

  • Yes, MultiLineStrings are supported by mapbox-gl-js. Here's a working JSBIN: https://jsbin.com/cozudodelo/edit?html,output

    I would recommend validating your GeoJSON with a tool like geojsonhint to make sure you're not running into missing brackets or something.