All Projects → jgravois → lrm-esri

jgravois / lrm-esri

Licence: Apache-2.0 license
use Esri's hosted routing service in Leaflet to generate walk, car and truck routes/directions

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to lrm-esri

esri-leaflet-vector
Display ArcGIS Online vector basemaps w/ Esri Leaflet
Stars: ✭ 39 (+77.27%)
Mutual labels:  leaflet, esri
leaflet.esri
ESRI Plugin for Leaflet R Package
Stars: ✭ 31 (+40.91%)
Mutual labels:  leaflet, esri
databases-w-r
Databases with R, the latest - rstudio::conf2019
Stars: ✭ 33 (+50%)
Mutual labels:  leaflet
leaflet-paintpolygon
Leaflet plugin to create polygon with circle as paint
Stars: ✭ 38 (+72.73%)
Mutual labels:  leaflet
leaflet-area-select
Control to just select an area and provide bbox for it
Stars: ✭ 27 (+22.73%)
Mutual labels:  leaflet
enmodal
transit planning & analysis in your browser
Stars: ✭ 38 (+72.73%)
Mutual labels:  leaflet
geofind
Multiplayer Geographical Guessing Game using PostGIS, Nuxt, Leaflet & Colyseus.
Stars: ✭ 31 (+40.91%)
Mutual labels:  leaflet
wab-test-example
ESRI Web App Builder Widget built using a wrapped widget convention and containing unit tests. This widget is meant to be used as an example to demonstrate the two techniques.
Stars: ✭ 21 (-4.55%)
Mutual labels:  esri
frakegps
Simulate a simple GPS device with gpsd or geoclue2
Stars: ✭ 22 (+0%)
Mutual labels:  leaflet
GoogleMapsHelper
An easy to integrate Model Based Google Maps Helper (SVHTTPClient, AFNetworking) That lets you Geo Code , Reverse Geocode, Get Directions , Places Autocomplete.
Stars: ✭ 21 (-4.55%)
Mutual labels:  directions
EsriRESTScraper
A Python class that scrapes ESRI Rest Endpoints and exports data to a geodatabase
Stars: ✭ 43 (+95.45%)
Mutual labels:  esri
leaflet-webpack
Minimal boilerplate to use Leaflet with webpack
Stars: ✭ 24 (+9.09%)
Mutual labels:  leaflet
dtp-stat-archive
Карта ДТП v1.0. 👉 База знаний о проекте: https://github.com/dtpstat/dtp-project/wiki
Stars: ✭ 142 (+545.45%)
Mutual labels:  leaflet
harp-leaflet
Leaflet plugin for harp.gl
Stars: ✭ 16 (-27.27%)
Mutual labels:  leaflet
antaresViz
ANTARES Visualizations
Stars: ✭ 19 (-13.64%)
Mutual labels:  leaflet
vue2-leaflet-vectorgrid
A Leaflet.VectorGrid plugin for the vue2-leaflet package.
Stars: ✭ 17 (-22.73%)
Mutual labels:  leaflet
react-native-leaflet
A LeafletView component using WebView and Leaflet map for React Native applications
Stars: ✭ 53 (+140.91%)
Mutual labels:  leaflet
coronavirus-map-dashboard
🦠 Coronavirus (COVID-19) Map Dashboard using coronavirus-tracker-api
Stars: ✭ 41 (+86.36%)
Mutual labels:  leaflet
L.Control.LineStringSelect
Polyline selection control for Leaflet
Stars: ✭ 43 (+95.45%)
Mutual labels:  leaflet
leaflet-tag-filter-button
Adds tag filter control for layers (marker, geojson features etc.) to LeafLet.
Stars: ✭ 48 (+118.18%)
Mutual labels:  leaflet

Leaflet Routing Machine - Esri plugin

enables walk, drive and truck routing using Esri's hosted service.

Demo

Check out the live demo.

Usage

animation

<script src="./lrm-esri.js"></script>
/*
additional profiles:
Walking, Trucking, Rural Driving, Walking Distance, Trucking Distance, Driving Distance and Rural Driving Distance
*/
var control = L.Routing.control({
	router: L.Routing.esri({
    liveTraffic: true,
    profile: 'Driving'
  })
}).addTo(map);

Features

Esri's hosted routing service can find the shortest driving, truck and walk time or distance for up to 150 input stops. It is able to incorporate both live and historic traffic and can reorder input stops to find the optimal sequence.

Authentication

Use a proxied service

You can allow anonymous users to get directions in your application by leveraging a proxied service - live demo

  1. Sign up for a free developer account
  2. Create your own proxied service url
  3. supply the url in the provider constructor
var control = L.Routing.control({
  router: L.Routing.esri({
    url: '<your proxied service url>'
  })
}).addTo(map);

When credentials are embedded, 1250 requests/month are provided for free. Deployment packs are available to help you scale.

Use OAuth2

You can also use OAuth2 and bill routing charges directly to existing ArcGIS users - live demo

  1. Sign up for a free developer account
  2. Create and register a new application
  3. Reference your clientID in your app and configure a redirectUri
  4. after the user signs in, supply their token in the provider constructor (more info here)
var control = L.Routing.control({
  router: L.Routing.esri({
    token: '<user token>'
  })
}).addTo(map);

Development Instructions

If you'd like to inspect and modify the source code, follow the instructions below to set up a local development environment.

  1. Fork and clone
  2. cd into the lrm-esri folder
  3. Install the package.json dependencies by running npm install
  4. Run npm start from the command line. This will recompile minified source in the dist directory, launch a tiny webserver and begin watching the raw source for changes.
  5. Run http://localhost:8080/examples/index.html to check out your changes
  6. Create a pull request

Dependencies

  • leaflet
  • leaflet-routing-machine
  • cors-lite
  • esri-leaflet

Resources

Issues

Find a bug or want to request a new feature? Please let us know by submitting an issue.

Contributing

Esri welcomes contributions from anyone and everyone. Please see our guidelines for contributing.

Caveats

Many Esri routing service features have not been implemented

  • barriers
  • route optimization
  • driving, trucking and walking distance
  • time windows
  • routing for emergency vehicles

Licensing

Copyright © 2017 Esri

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

A copy of the license is available in the repository's LICENSE file.

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].