I have a Symbol Layer with 126 symbols in the layer, each passed through the ShapeSource as a featurecollection. Each feature in the featureCollection has its own unique set of variables, including an icon, e.g.,
featureCollection: MapboxGL.geoUtils.addToFeatureCollection( this.state.featureCollection, MapboxGL.geoUtils.makeFeature({type: 'Point', coordinates: location}, { icon: icon, key: key, data: nm, wdir: wdir, relh: relh, temp: temp, pres: pres, stid: stid }) ),
All of the properties (icon, key, wdir, etc) get passed as '{tokens}'. My question is, how can I pass the featureCollection property that I define as 'wdir' to iconRotate just as I do for iconImage: '{icon}' or textField: '{temp}'? At the moment is does not seem the iconRotate processes the information similarly to the iconImage and textField props (requires an actual value, not a token).
I have a Symbol Layer with 126 symbols in the layer, each passed through the ShapeSource as a featurecollection. Each feature in the featureCollection has its own unique set of variables, including an icon, e.g.,
featureCollection: MapboxGL.geoUtils.addToFeatureCollection( this.state.featureCollection, MapboxGL.geoUtils.makeFeature({type: 'Point', coordinates: location}, { icon: icon, key: key, data: nm, wdir: wdir, relh: relh, temp: temp, pres: pres, stid: stid }) ),
All of the properties (icon, key, wdir, etc) get passed as '{tokens}'. My question is, how can I pass the featureCollection property that I define as 'wdir' to iconRotate just as I do for iconImage: '{icon}' or textField: '{temp}'? At the moment is does not seem the iconRotate processes the information similarly to the iconImage and textField props (requires an actual value, not a token).Thank you!