How to use own map database to show a map on website?

后端 未结 6 700
既然无缘
既然无缘 2021-01-15 18:42

How to use own map database to display map on a website and use that map to find route and do other stuff ?

6条回答
  •  爱一瞬间的悲伤
    2021-01-15 19:41

    You have two options in order to calculate routes depending on your database. If your database has clean and accurate address names then you can easily use the google maps API that can be found here: https://developers.google.com/maps/documentation/directions/. Bare in mind that you can only execute 2500 requests per day with the free version.

    On the other hand if you have a network defined on your db (have the roads in a nodes and arcs manner) then you can implement Dijsktra's algorithm.

    Have a look here: http://www.vogella.com/articles/JavaAlgorithmsDijkstra/article.html Because of the fact that the network should be loaded from the database in order to calculate the best route I suggest the singleton pattern.

提交回复
热议问题