-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[MGLGeoJSONSource initWithIdentifier:geoJSONData] crashes if data isn't a feature collection #6986
Comments
Same error I'm also getting this bug when adding MGLCircleStyleLayer after a MGLGeoJSONSource without any markers (it is only a single line).
|
I take that back... It seems to crash when I reuse it works fine. However as like below, it will crash
|
This line assumes it’s a feature collection without checking first. This initializer should check first and return |
Why is a feature collection required? Can we implement full GeoJSON support instead? |
Oh, I was unaware that the style specification allows GeoJSON layers to have any GeoJSON type at the root. MGLGeoJSONStyleLayer should definitely support all of GeoJSON, because any type could come from a preexisting layer in the style. With that change, /cc @boundsj |
Fixed in #7145 |
The following code crashes with the unhandled exception
mapbox::util::bad_variant_access: in get<T>()
on this line.The text was updated successfully, but these errors were encountered: