[Routing] Javascript Router
Christian Vetter
veaac.fdirct at gmail.com
Sun Jun 26 23:16:13 BST 2011
Hi,
I guess nobody ever did Java Script routing for real, since routing
usually involves going through a lot of data. As you normally have to
retrieve this data from a server it's much easier just to let the
server compute the route instead, possible making use of
precomputation.
If you want to go ahead with this, take a look at Dijkstra's algorithm
[1]. It requires a normal graph data structure ( an adjacency array
should suffice ) as well as a priority queue ( e.g. a binary heap [2]
)
Of course there exist more complex and efficient algorithms, but
Dijkstra's should suffice for a first Java Script implementation.
Best regards,
Christian Vetter
[1]: http://en.wikipedia.org/wiki/Dijkstra%27s_algorithm
[2]: http://en.wikipedia.org/wiki/Binary_heap
On Sun, Jun 26, 2011 at 9:03 PM, Andreas Hubel <andi at saerdnaer.de> wrote:
> Hi,
>
> as there is now an javascript renderer: has anyone of you experimented with an routing algorithm in javascript?
>
> Where would you recommend to start? (which algorithm, data structures etc)
>
> Greets, Andi
>
>
>
>
> _______________________________________________
> Routing mailing list
> Routing at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/routing
>
More information about the Routing
mailing list