{"id":17218431,"url":"https://github.com/perliedman/lrm-osrm4","last_synced_at":"2025-03-25T14:25:32.627Z","repository":{"id":143887820,"uuid":"84576877","full_name":"perliedman/lrm-osrm4","owner":"perliedman","description":"Leaflet Routing Machine plugin with support for OSRM version 4","archived":false,"fork":false,"pushed_at":"2017-03-10T16:05:14.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-01T19:20:21.596Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/perliedman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-10T16:02:52.000Z","updated_at":"2017-03-10T16:03:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"2566d2b2-43e5-4cbf-9969-08db7f38b5f1","html_url":"https://github.com/perliedman/lrm-osrm4","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perliedman%2Flrm-osrm4","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perliedman%2Flrm-osrm4/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perliedman%2Flrm-osrm4/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perliedman%2Flrm-osrm4/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/perliedman","download_url":"https://codeload.github.com/perliedman/lrm-osrm4/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245478686,"owners_count":20622021,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T03:46:48.880Z","updated_at":"2025-03-25T14:25:32.593Z","avatar_url":"https://github.com/perliedman.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Leaflet Routing Machine / OSRM 4\n================================\n\n[![npm version](https://img.shields.io/npm/v/lrm-osrm4.svg)](https://www.npmjs.com/package/lrm-osrm4)\n\nExtends [Leaflet Routing Machine](https://github.com/perliedman/leaflet-routing-machine) with support for [OSRM](https://graphhopper.com/)'s old major version, OSRM 4; Leaflet Routing Machine has built-in support for OSRM 5.\n\nSome brief instructions follow below, but the [Leaflet Routing Machine tutorial on alternative routers](http://www.liedman.net/leaflet-routing-machine/tutorials/alternative-routers/) is recommended.\n\n## Installing\n\nGo to the [releases page](https://github.com/perliedman/lrm-osrm4/releases) to get the script to include in your page. Put the script after Leaflet and Leaflet Routing Machine has been loaded.\n\nTo use with for example Browserify:\n\n```sh\nnpm install --save lrm-osrm4\n```\n\n## Using\n\nThere's a single class exported by this module, `L.Routing.OSRM4`. It implements the [`IRouter`](http://www.liedman.net/leaflet-routing-machine/api/#irouter) interface. Use it to replace Leaflet Routing Machine's default OSRM 5 router implementation:\n\n```javascript\nvar L = require('leaflet');\nrequire('leaflet-routing-machine');\nrequire('lrm-osrm4'); // This will tack on the class to the L.Routing namespace\n\nL.Routing.control({\n    router: L.routing.osrm4('http://your-osrm-url'),\n}).addTo(map);\n```\n\nNote that you will need to set up your own OSRM4 server: OSRM's demo server is running OSRM 5.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperliedman%2Flrm-osrm4","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperliedman%2Flrm-osrm4","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperliedman%2Flrm-osrm4/lists"}