{"id":19824773,"url":"https://github.com/stephangeorg/leaflet-routeboxer","last_synced_at":"2025-07-23T14:08:11.965Z","repository":{"id":34392024,"uuid":"38319276","full_name":"StephanGeorg/leaflet-routeboxer","owner":"StephanGeorg","description":"Google RouteBoxer implementation for Leaflet","archived":false,"fork":false,"pushed_at":"2021-01-11T08:01:09.000Z","size":42,"stargazers_count":46,"open_issues_count":0,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-08T22:16:21.701Z","etag":null,"topics":["leaflet","polyline","routeboxer"],"latest_commit_sha":null,"homepage":"https://stephangeorg.github.io/leaflet-routeboxer/example/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StephanGeorg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-30T16:06:26.000Z","updated_at":"2023-11-27T12:19:15.000Z","dependencies_parsed_at":"2022-08-31T00:00:35.689Z","dependency_job_id":null,"html_url":"https://github.com/StephanGeorg/leaflet-routeboxer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/StephanGeorg/leaflet-routeboxer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StephanGeorg%2Fleaflet-routeboxer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StephanGeorg%2Fleaflet-routeboxer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StephanGeorg%2Fleaflet-routeboxer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StephanGeorg%2Fleaflet-routeboxer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StephanGeorg","download_url":"https://codeload.github.com/StephanGeorg/leaflet-routeboxer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StephanGeorg%2Fleaflet-routeboxer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266691580,"owners_count":23969182,"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","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["leaflet","polyline","routeboxer"],"created_at":"2024-11-12T11:05:53.171Z","updated_at":"2025-07-23T14:08:11.938Z","avatar_url":"https://github.com/StephanGeorg.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Leaflet RouteBoxer\n\nThis is a Leaflet implementation of Google's RouteBoxer class.\n\nThe RouteBoxer class generates a set of L.LatLngBounds objects that are guaranteed\nto cover every point within a specified distance of a path, such as that generated\nfor a route by an OSRM directions service.\n\n## Example\n\nCheck out the example [demo](https://stephangeorg.github.io/leaflet-routeboxer/example/)\n\n## Usage\n\nYou need to pass an array of L.Latlng objects (route) to the L.RouteBoxer.\n\n\n```javascript\n\nvar route = [\n  [50.5, 30.5],\n  [50.4, 30.6],\n  [50.3, 30.7]\n];\nvar distance = 10; // Distance in km\nvar boxes = L.RouteBoxer.box(route, distance);\n\n```\n\n### Using w/ OSRM service\n\nOSRM uses polyline encoding to save bandwith. To decode the polyline you can use\n[Leaflet.encoded](https://github.com/jieter/Leaflet.encoded).\n\n```javascript\n\n// data.route_geometry is the result from a OSRM endpoint\nvar route = new L.Polyline(L.PolylineUtil.decode(data.route[0].geometry));\nvar distance = 10; // Distance in km\nvar boxes = L.RouteBoxer.box(route, distance);\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephangeorg%2Fleaflet-routeboxer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstephangeorg%2Fleaflet-routeboxer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephangeorg%2Fleaflet-routeboxer/lists"}