I need to modify the properties data of in-place features from a vector tileset. We currently set style expressions but they can be quite large and affect performance (eg. a match expression on a list of 1000 ids). Better to have a static style and modify properties in the data.
Feature data can be modified directly: https://docs.mapbox.com/ios/maps/examples/runtime-animate-line/
A nice to have would be a function that replaces or merges the properties of a set of features by feature id.
const featureUpdates = {
<featureId1>:{name:"New Name 1", data:"new data 1"},
<featureId2>:{name:"New Name 2", data:"new data 2"}
}
this._map.modifyRenderedFeaturesProperties(featureUpdates, ['layerId'])
and/or
this._map.setPropertyOnFeatures("propertyName", propertyValue, [<featureId1>,<featureId2>], ['layerId'])
I need to modify the properties data of in-place features from a vector tileset. We currently set style expressions but they can be quite large and affect performance (eg. a match expression on a list of 1000 ids). Better to have a static style and modify properties in the data.
Feature data can be modified directly: https://docs.mapbox.com/ios/maps/examples/runtime-animate-line/
A nice to have would be a function that replaces or merges the properties of a set of features by feature id.
and/or