How to change image color dynamically? #3630
Unanswered
udaysagartammina
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
iconColor not working.
<MapboxGL.ShapeSource
id={"exampleShapeSource"}
hitbox={{ width: 20, height: 20 }}
shape={{
type: "FeatureCollection",
features: array,
}}
<MapboxGL.Images
images={{ mapicon: require("App/Assets/Images/icons/Map/PIN.png") }}
/>
<MapboxGL.SymbolLayer
id={"exampleIconName1"}
style={{
iconImage: "mapicon",
iconAllowOverlap: true,
iconSize: 1.1,
iconColor: "red", // Change color dynamically.
}}
/>
</MapboxGL.ShapeSource>;
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions