Open Gyroscope07 opened 5 years ago
MapBox styles include interpolation definitions for things line-width, fill-opacity etc in the following form:
... { ... "line-opacity": [ "interpolate", ["linear"], ["zoom"], 5, 0, 6, 0.5 ], ... }, ...
It looks as though the styles parser in this library can only handle distinct step definitions in this form:
... { ... "line-opacity": { "base": 1.5, "stops": [ [ 2, 0.3 ], [ 7, 0 ] ] }, ... } ....
which causes an invalid cast exception when trying to parse the style.json
if (paintData.ContainsKey("line-opacity")){ paint.LineOpacity = Convert.ToDouble(getValue(paintData["line-opacity"], attributes)); }
System.InvalidCastException: 'Unable to cast object of type 'System.Object[]' to type 'System.IConvertible'.'
As you can see, in this library only „stops“ are implemented. I assume, that you have to implement by your own. But be careful, this library creates tiles with integer zoom values.
MapBox styles include interpolation definitions for things line-width, fill-opacity etc in the following form:
It looks as though the styles parser in this library can only handle distinct step definitions in this form:
which causes an invalid cast exception when trying to parse the style.json