Astar algorithm implementation intended to be used in Leaflet-based applications