You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 3, 2019. It is now read-only.
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
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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:
The text was updated successfully, but these errors were encountered: