itinero / routing

The routing core of itinero.
Apache License 2.0
222 stars 71 forks source link

LoadOsmData #162

Closed bmastar closed 6 years ago

bmastar commented 6 years ago

Hi; I want create app that calculat distance between tow points. I create new project with VS 2012 and I download Itinero.dll v 1.3.2 with nuget commande line. I also add "Reminiscence.dll" to Reference after an error that has occurred.

then when I tray to test the code of the documentation (http://docs.itinero.tech/docs/itinero/index.html) below :

// using Itinero; // using Itinero.IO.Osm; // using Itinero.Osm.Vehicles;

// load some routing data and create a router. var routerDb = new RouterDb(); using (var stream = new FileInfo(@"/path/to/some/osmfile.osm.pbf").OpenRead()) { routerDb.LoadOsmData(stream, Vehicle.Car); } var router = new Router(routerDb);

// calculate a route. var route = router.Calculate(Vehicle.Car.Fastest(), 51.26797020271655f, 4.801905155181885f, 51.26100849597512f, 4.780721068382263f); var geoJson = route.ToGeoJson();

I dont find the LoadOsmData method in RouterDb class.

can you please give me some orientations to solve this Issues.

xivk commented 6 years ago

Can you give some more details on your error? What is happening where and when?

xivk commented 6 years ago

Feel free to reopen if this is an issue still.

rodion-m commented 5 years ago

Adding package Itinero.IO.Osm solved this.