maplibre / maplibre-react-native

A MapLibre react native module for creating custom maps
Other
221 stars 52 forks source link

Symbol Layer Icon Color #406

Closed danish-danial closed 3 weeks ago

danish-danial commented 3 months ago

Hey everyone,

I can't seem to change the color of the Symbol Layer icon. I refer to the StackOverflow on how to convert the icon and etc. It seem the icon still white even though I assign the iconColor in style.

Here are the line of the code:

 <SymbolLayer
                    key={index}
                    id={`vector-layer-${index}`}
                    style={{
                      iconImage: pointMarker,
                      iconSize: 0.05,
                      iconOpacity: vector.hidden ? 0 : 1,
                      iconColor: vector.color,
                    }}
/>

image

Can you give me a guidance on how can I color the Symbol Layer?

Thanks.

caspg commented 3 months ago

Is your icon in SDF format?