/leaflet-sea-routes

Draw route between two points through sea

Primary LanguageJavaScriptMIT LicenseMIT

leaflet-sea-routes

A leaflet plugin for drawing routes on seas between two given points, using elfalem's Leaflet.curve and bgrin's javascript-astar.

Code example

// Define coordinates
var source = [0,0];
var destination = [-37, 37];

// Get visuals or the array of the path
var curve = L.pathCurve(source, destination);
var path = L.route(source, destination);

// Add to map
curve.addTo(map);

Example

Route drawn for (-5, 67) => (58, -27):

route example