This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

How to integrate openstreetmap with UWP to find the shortest path

0

hi I want to develop an UWP app (a Windows phone app) which shows a map on a user interface. When user select 2 points it should shows the shortest path on the map. I am going to implement the dijkstra's algorithm to find the shortest path.I can implement this algorithm if I have map data. I just don't understand how to start. How to integrate openstreet map with my UWP app and how to get map data.

Please help me, Thanks

asked 05 Jan '18, 08:26

swiftDroid's gravatar image

swiftDroid
21337
accept rate: 0%

edited 05 Jan '18, 22:44

nevw's gravatar image

nevw
9.8k2690178


One Answer:

3

Basically there are 3 solutions:

  • you use the API of a 3rd party provider to specify 2 points and let them calculate the route. This will probably cost you money to use their API, but you do no have to create a routing algorithm, nor do you have to download OSM data.
  • You download OSM-data to a local server, transform that data in such a way that you can develop a routing algorithm. Then you create an API on top of that server which you call from your UWP app (a Windows phone app)
  • You do the same as in step 2, but move the data to the phone (so-called off line maps) instead of keeping it on the server. This is the approach Maps.me, OsmAnd, MagicEarth etc. use

answered 05 Jan '18, 10:48

escada's gravatar image

escada
19.0k16166302
accept rate: 21%

Thank you so much for the great clarification :)

(08 Jan '18, 02:41) swiftDroid

Source code available on GitHub .