I'm facing an issue where I'm adding layers using some layers. I'm getting an error such as type '_Map<String, dynamic>' is not a subtype of type 'String' using await _controller?.style.addLayer(CircleLayer.decode(layer)); and also, other kinds of layers triggers the same error eventually.
The JSON structure is right below, also I believe that what is causing this issue is the expression on circle-color cause I've tried doing the same as the decode method does manually by doing (layer["paint"]["circle-color"] as List?)?.toRGBAInt() but received the same error unfortunately.
{
"type":"circle",
"paint":{
"circle-color":hsla(49,
95%,
42%,
0.3),
"circle-radius":[
"interpolate",
[
"linear"
],
[
"zoom"
],
3,
1,
7,
3,
8,
10,
12,
50
],
"circle-opacity":0.5
},
"maxzoom":22,
"minzoom":3,
"id":"faa_stadiums",
"title":"Stadiums",
"source":"faa_airspace",
"source-layer":"tiles.faa_stadiums",
"thumbnail_url":"https":,
"description":"This layer displays the corresponding radius of stadiums where flights would be restricted during Major League Baseball",
"National Football League",
"\nNCAA",
"and motor speedway events.\n\nNote":"TFRs will also be in effect for these areas when events are active.\n"
}
Hi folks,
I'm facing an issue where I'm adding layers using some layers. I'm getting an error such as
type '_Map<String, dynamic>' is not a subtype of type 'String'
usingawait _controller?.style.addLayer(CircleLayer.decode(layer));
and also, other kinds of layers triggers the same error eventually.The JSON structure is right below, also I believe that what is causing this issue is the expression on
circle-color
cause I've tried doing the same as the decode method does manually by doing(layer["paint"]["circle-color"] as List?)?.toRGBAInt()
but received the same error unfortunately.What do I'm possibly doing wrong?