All Projects → StephanGeorg → leaflet-routeboxer

StephanGeorg / leaflet-routeboxer

Licence: other
Google RouteBoxer implementation for Leaflet

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to leaflet-routeboxer

swap
A Solver for the Wavelength Assignment Problem (RWA) in WDM networks
Stars: ✭ 27 (-30.77%)
Mutual labels:  leaflet
mapr
Map species occurrence data
Stars: ✭ 34 (-12.82%)
Mutual labels:  leaflet
react-esri-leaflet
react components for esri-leaflet
Stars: ✭ 24 (-38.46%)
Mutual labels:  leaflet
svg2polylines
Rust library to convert SVG data to a list of flattened polylines. Also includes FFI bindings.
Stars: ✭ 16 (-58.97%)
Mutual labels:  polyline
MinedMap
Minecraft map renderer and viewer
Stars: ✭ 35 (-10.26%)
Mutual labels:  leaflet
web-maps-wcag-evaluation
Manual accessibility evaluation of popular web map tools.
Stars: ✭ 28 (-28.21%)
Mutual labels:  leaflet
vaguely-rude-places
The map of Vaguely Rude Place Names
Stars: ✭ 19 (-51.28%)
Mutual labels:  leaflet
crisis-news-mapper
日本の災害関連ニュースをTwitterから収集して地図上にマッピングするFirebaseプロジェクト crisis.yuiseki.net
Stars: ✭ 13 (-66.67%)
Mutual labels:  leaflet
ng-leaflet
Angular 2 component for Leaflet 1.x (WIP - Help Wanted)
Stars: ✭ 16 (-58.97%)
Mutual labels:  leaflet
papyrusjs
papyrus.js renders maps of Minecraft: Bedrock Edition worlds using node.js, LevelDB and leaflet.
Stars: ✭ 53 (+35.9%)
Mutual labels:  leaflet
papyruscs
PapyrusCS renders maps of Minecraft: Bedrock Edition worlds using C#, LevelDB and leaflet.
Stars: ✭ 221 (+466.67%)
Mutual labels:  leaflet
leaflet-kmz
A KMZ file loader for Leaflet Maps
Stars: ✭ 33 (-15.38%)
Mutual labels:  leaflet
Leaflet.UTFGrid
UTFGrids for Leaflet 1.0
Stars: ✭ 16 (-58.97%)
Mutual labels:  leaflet
leaflet-react-track-player
This is plugin for react-leaflet. It create player for control of track. 🍃🌎⚔
Stars: ✭ 21 (-46.15%)
Mutual labels:  leaflet
acf-openstreetmap-field
WordPress ACF Field for OpenStreetMap
Stars: ✭ 88 (+125.64%)
Mutual labels:  leaflet
gpxstudio.github.io
The online GPX file editor
Stars: ✭ 233 (+497.44%)
Mutual labels:  leaflet
leaflet.esri
ESRI Plugin for Leaflet R Package
Stars: ✭ 31 (-20.51%)
Mutual labels:  leaflet
GTD-Visualization
全球恐怖袭击数据可视化
Stars: ✭ 31 (-20.51%)
Mutual labels:  leaflet
leaflet-geojson-selector
Show GeoJSON Layer like as Interactive Menu List
Stars: ✭ 88 (+125.64%)
Mutual labels:  leaflet
SS13WebMap
A project I made to make learning the SS13 maps easier. All images used in this project are at https://mocha.affectedarc07.co.uk/webmap/
Stars: ✭ 14 (-64.1%)
Mutual labels:  leaflet

Leaflet RouteBoxer

This is a Leaflet implementation of Google's RouteBoxer class.

The RouteBoxer class generates a set of L.LatLngBounds objects that are guaranteed to cover every point within a specified distance of a path, such as that generated for a route by an OSRM directions service.

Example

Check out the example demo

Usage

You need to pass an array of L.Latlng objects (route) to the L.RouteBoxer.

var route = [
  [50.5, 30.5],
  [50.4, 30.6],
  [50.3, 30.7]
];
var distance = 10; // Distance in km
var boxes = L.RouteBoxer.box(route, distance);

Using w/ OSRM service

OSRM uses polyline encoding to save bandwith. To decode the polyline you can use Leaflet.encoded.

// data.route_geometry is the result from a OSRM endpoint
var route = new L.Polyline(L.PolylineUtil.decode(data.route[0].geometry));
var distance = 10; // Distance in km
var boxes = L.RouteBoxer.box(route, distance);
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].