You’ll need to explain in a bit more detail what you’re actually trying to do…
It looks like you’re using some code from somewhere to do something with Openstreetmap data, but without any information about what you’re actually trying to achieve and what code you’re using and on what platform people will be unlikely to be able to help.
It’s a great example for me to understand the things around openSteetMap.
I have changed the thing over there for my own purposes, so instead of using to search for specific location, I’m using a bicylestations.csv file to load all the stations and create markers for them on the map.
I’m using the Router class to resolve those stations =>
var resolved = router.Resolve(Vehicle.Bicycle, new OsmSharp.Math.Geo.GeoCoordinate(latitude, longitude));
3.And then I’m using RouterTSPWrapper to calculate the TSP router between all stations.
var tspSolver = new RouterTSPWrapper(new RouterTSPAEXGenetic(1000, 200), router, interpreter);
var route = tspSolver.CalculateTSP(Vehicle.Bicycle, resolvedPoints.ToArray());
route.SaveAsGpx(new FileInfo(“output.gpx”).OpenWrite());
So, my next step will be display that route on my map. (I think that I will need to use create LayerOsm or something like that).
I’ve not seen many/any WPF questions asked via the OSM help site https://help.openstreetmap.org/ , so maybe you’re better off asking via your example’s comments: