File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
MapTilerSDK/src/main/java/com/maptiler/maptilersdk/map/style/layer/symbol Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -193,9 +193,14 @@ class MTSymbolLayer : MTLayer {
193193 * Text color (constant or expression), written under paint as text-color.
194194 */
195195 var textColor: StyleValue ?
196- get() = _paint .textColor
196+ get() = _paint ? .textColor
197197 set(value) {
198- _paint .textColor = value
198+ if (value != null ) {
199+ if (_paint == null ) _paint = MTSymbolPaint ()
200+ _paint ?.textColor = value
201+ } else {
202+ _paint = null
203+ }
199204 }
200205
201206 /* *
@@ -222,7 +227,7 @@ class MTSymbolLayer : MTLayer {
222227
223228 @Suppress(" PropertyName" )
224229 @SerialName(" paint" )
225- private var _paint : MTSymbolPaint = MTSymbolPaint ()
230+ private var _paint : MTSymbolPaint ? = null
226231
227232 constructor (
228233 identifier: String ,
You can’t perform that action at this time.
0 commit comments