I'm trying to construct my own mapcss file, and I'm having problems with loading this with OsmSharp. The parsing itself is fine (since I get a cssfile from the code below), but the interpreter is returning a NullReferenceException (se below). I've worked around this issue by removing the generic way css clause, but this should work fine though?
Example code:
var cssfile = OsmSharp.UI.Map.Styles.MapCSS.v0_2.Domain.MapCSSFile.FromString(mapcss);
var geometryInterpreter = new OsmSharp.Osm.Interpreter.SimpleGeometryInterpreter();
var interpreter = new OsmSharp.UI.Map.Styles.MapCSS.MapCSSInterpreter(cssfile,
new OsmSharp.UI.Map.Styles.MapCSS.MapCSSDictionaryImageSource(), geometryInterpreter);
Exception stack trace for the NullReferenceException:
at OsmSharp.UI.Map.Styles.MapCSS.v0_2.Domain.SelectorRuleTagValueComparison.AddRelevantKeysTo(ICollection`1 relevantKeys)
at OsmSharp.UI.Map.Styles.MapCSS.MapCSSInterpreter.PrepareForProcessing()
at OsmSharp.UI.Map.Styles.MapCSS.MapCSSInterpreter..ctor(MapCSSFile mapCSSFile, IMapCSSImageSource imageSource, GeometryInterpreter geometryInterpreter)
at RenderTest.Form1..ctor() in K:\Testing\RenderTest\RenderTest\Form1.cs:line 80
at RenderTest.Program.Main() in K:\Testing\RenderTest\RenderTest\Program.cs:line 21
I'm trying to construct my own mapcss file, and I'm having problems with loading this with OsmSharp. The parsing itself is fine (since I get a cssfile from the code below), but the interpreter is returning a NullReferenceException (se below). I've worked around this issue by removing the generic way css clause, but this should work fine though?
Example code:
MapCss file:
Exception stack trace for the NullReferenceException: