mapbox / mapbox-gl-native-android

Interactive, thoroughly customizable maps in native Android powered by vector tiles and OpenGL
https://mapbox.com/mobile
Other
218 stars 114 forks source link

PropertyFactory.lineColor not working #741

Closed renatojobal closed 1 year ago

renatojobal commented 1 year ago

PropertyFactory.lineColor() works well when using it in the current form:

PropertyFactory.lineColor(
ContextCompat.getColor(context, android.R.color.holo_blue_light)
)

But when I use it in this way it does no work:

PropertyFactory.lineColor(
0xFFFF0000.toInt()
)

or

PropertyFactory.lineColor(
"0xFFFF0000"
)

or

PropertyFactory.lineColor(
"FFFF0000"
)

The documentation is not much clear about how the format in wich to pass the color:

  /**
   * The color with which the line will be drawn.
   *
   * @param value a int color value
   * @return property wrapper around String color
   */

Mapbox version: implementation 'org.maplibre.gl:android-sdk:9.4.0'

renatojobal commented 1 year ago

My bad, I was overwriting the value of the layer in the following code, sorry