I'm loading a style with an existing CircleLayer
and I'd like to programmatically add another such layer with similar styling (say, same except different color). Its geo data will be created programatically as well.
I could not find an easy API for cloning a layer.
But even if I do something like:
CircleLayer oldLayer, newLayer = ...;
newLayer.withProperties(
PropertyFactory.circleColor(Color.parseColor("#e55e5e")),
oldLayer.getCircleStrokeColor()
);
Setting circle color (as a literal) works but for setting stroke color (taken from the other layer) I'm getting:
09-25 20:59:20.783 18014-18014/com.example.client E/mbgl: {example.client}[JNI]: Error setting property: circle-stroke-color property not found
I checked, oldLayer
is properly initialized and oldLayer.getCircleStrokeColor()
does return a proper PropertyValue
. What am I missing?