Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 868 Bytes

TravelArea.md

File metadata and controls

36 lines (27 loc) · 868 Bytes

Travel Area

TravelArea

var area = new L.esri.Routing.DriveArea().origin(latlng).distance(5).distance(10).distance(15).addTo(map);

Barriers

var area = new L.esri.Routing.DriveArea().origin(latlng).distance(5).barrier(geojson).addTo(map);

Styling

var area = new L.esri.Routing.DriveArea({
    style: stylingFunction, // path options or function
    barrierStyle: stylingFunction // path options or function
}).origin(latlng).distance(5).barrier(geojson).addTo(map);

Access Raw Polygons

var area = new L.esri.Routing.DriveArea().origin(latlng).distance(5).distance(10).run(function(error, areas, barriers){
    // console.log(do stuff);
});
var area = new L.esri.Routing.DriveArea().origin(latlng).distance(5).distance(10).run(function(error, areas, barriers){
    // console.log(do stuff);
});