mapbox-gl-js version: >=0.27.0 <=0.38.0
(1) I have a Feature
geojson type of a single polygon adding to my map from a url source.
(2) I also have a FeatureCollection
geojson type of ~4k polygons adding to the map also from a url source.
I use turf.intersect between (1) and (2) to select the intersecting polygons of (2).
I then store the intersecting polygons [a sub-set of (2)] to an array.
I then manipulate the values of some properties of those intersecting polygons with simple math.
I now want to update (2) with the resulting values of the array.
I would love to use something like setData
to update (2), but that is not possible for a subset which also is not (a) a geojson data object or (b) a url to one as specified in the docs.
Hopefully I have explained this sufficiently. If so, what is the suggested workflow in this case?