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 was archived by the owner on Sep 3, 2019. It is now read-only.
Is it possible to render an entire map with roads, highways, land, water, pois and everything from an osm.pbf?
I tried this example and it doesn't display anything on the map
//initialize map.
var map = new OsmSharp.UI.Map.Map(new WebMercator());
// create the MapCSS image source.
var imageSource = new MapCSSDictionaryImageSource();
// initialize mapcss interpreter.
var mapCssInterpreter = new MapCSSInterpreter(File.OpenRead(@"data\default.mapcss"), imageSource);
var source = MemoryDataSource.CreateFromPBFStream(File.OpenRead(@"osm.pbf"));
var testLayer = new LayerOsm(source, mapCssInterpreter,new WebMercator());
map.AddLayer(testLayer);
MapControl.SuspendNotifyMapViewChanged();
// set control properties.
MapControl.MapZoom = 14;
MapControl.Map = map;
MapControl.MapCenter = testLayer.Envelope.Center;
MapControl.ResumeNotifyMapViewChanged();