{"id":24698651,"url":"https://github.com/faradayio/cm1-route","last_synced_at":"2025-07-12T03:15:04.931Z","repository":{"id":136464639,"uuid":"2217926","full_name":"faradayio/cm1-route","owner":"faradayio","description":"Routing/footprint engine extracted from HootRoot","archived":false,"fork":false,"pushed_at":"2012-10-08T22:17:19.000Z","size":817,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-01-27T04:29:31.701Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/faradayio.png","metadata":{"files":{"readme":"README.markdown","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":"2011-08-16T20:06:32.000Z","updated_at":"2020-09-10T18:52:55.000Z","dependencies_parsed_at":"2023-03-10T21:01:17.472Z","dependency_job_id":null,"html_url":"https://github.com/faradayio/cm1-route","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faradayio%2Fcm1-route","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faradayio%2Fcm1-route/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faradayio%2Fcm1-route/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faradayio%2Fcm1-route/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/faradayio","download_url":"https://codeload.github.com/faradayio/cm1-route/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244902936,"owners_count":20529114,"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":"2025-01-27T04:29:41.195Z","updated_at":"2025-03-22T03:42:06.582Z","avatar_url":"https://github.com/faradayio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Installation\n\nCopy cm1-route.js into your JavaScript assets directory.\n\nIn your HTML:\n\n    \u003cscript type=\"text/javascript\" src=\"javascript_assets_directory/cm1-route.js\"\u003e\u003c/script\u003e\n\n# Usage\n\n`Cm1Route` provides four functions for calculating routes (one for each mode). Each function takes a single parameter that is an object containing options, `success`, `failure`, and `loading`. Each option is a callback (or anonymous function) that is run when certain events occur. When routing is successfully finished, the callback is given an instance of a `Route` which provides a `totalDistance` property and a `draw` function that will draw the route on a map contained within the specified element. While the calculation is being performed, the optional loading callback is run that will allow you to display a loading status message. The failure callback is called when there is a problem obtaining a route. A parameter containing an error message is passed in.\n\n    \u003cscript type=\"text/javascript\" src=\"javascript_assets_directory/cm1-route.js\"\u003e\u003c/script\u003e\n\n    \u003cscript type=\"text/javascript\"\u003e\n      var route = new Cm1Route('Chicago, IL', 'New York, NY');\n      route.routeAutomobile({\n        success: function(route) {\n          alert('Total distance: ' + route.totalDistance);\n          route.draw('#mapelement');\n        },\n        failure: function(error) {\n          alert('Failed because ' + error);\n        },\n        loading: function() {\n          alert(\"I'm working on it!\");\n        }\n      });\n    \u003c/script\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaradayio%2Fcm1-route","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffaradayio%2Fcm1-route","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaradayio%2Fcm1-route/lists"}