{"_id":"@mapbox/mapbox-match.js","_rev":"292-90b27e30e4ef09ce34531c52f5cec3df","name":"@mapbox/mapbox-match.js","description":"A plugin to align geometries to OpenStreetMap data via the Mapbox Map Matching API","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@mapbox/mapbox-match.js","description":"A plugin to align geometries to OpenStreetMap data via the Mapbox Map Matching API","main":"index.js","version":"0.0.1","scripts":{"test":"zuul --local -- test/test.js","build":"mkdir -p dist && browserify -s mapmatching index.js > dist/mapbox.match.js && uglifyjs dist/mapbox.match.js -c -m > dist/mapbox.match.min.js"},"repository":{"type":"git","url":"git+ssh://git@github.com/mapbox/mapbox-match.js.git"},"browserify":{"transform":["brfs","hintify"]},"keywords":["leaflet","mapmatch","align","geojson","osm","resample"],"author":{"name":"Arun Ganesh"},"license":"MIT","bugs":{"url":"https://github.com/mapbox/mapbox-match.js/issues"},"homepage":"https://github.com/mapbox/mapbox-match.js","devDependencies":{"tape":"2.4.2","uglify-js":"2.4.16","zuul":"^3.0.0"},"dependencies":{"brfs":"^1.4.0","browserify":"^7.0.2","geojson-tidy":"^1.0.0","hintify":"^0.1.0","polyline":"0.0.3","queue-async":"^1.0.7","xhr":"^2.0.2"},"gitHead":"aba9e6ef348ca4bfa009670a8dd234d2882d0da4","_id":"@mapbox/mapbox-match.js@0.0.1","_shasum":"3055965f58b960e7ec7670f49b909c3e11d40dd9","_from":".","_npmVersion":"4.0.2","_nodeVersion":"4.6.2","_npmUser":{"name":"tmcw","email":"tom@macwright.org"},"dist":{"shasum":"3055965f58b960e7ec7670f49b909c3e11d40dd9","tarball":"https://registry.npmjs.org/@mapbox/mapbox-match.js/-/mapbox-match.js-0.0.1.tgz","integrity":"sha512-3T19W4nZw83dpUQ2s6vPUcMymAPni5KnKK4YXYBKZUgYFho1CvdxNivtqmxVLaaB7StfOjYD0FKe+KuDv/LRxQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAHAgFMufRjfXOSMuLPRFrX0wsO35liOcJMw6lkrdUSNAiBPlW9Lwi5hsklfF1/m9c3YUR1XiTF28NnCZ+ZbDp8y8Q=="}]},"maintainers":[{"name":"tmcw","email":"tom@macwright.org"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/mapbox-match.js-0.0.1.tgz_1480710695113_0.8997955734375864"},"directories":{}}},"readme":"[![Build Status](https://travis-ci.org/mapbox/mapbox-match.js.svg)](https://travis-ci.org/mapbox/mapbox/mapbox-match.js)\n\n# mapbox-match.js\n\n[Mapbox.js](https://github.com/mapbox/mapbox.js) plugin to match GeoJSON geometries to the OpenStreetMap streets network using the [Mapbox Map Matching API](https://www.mapbox.com/developers/api/map-matching).\n\n![screenshot 2015-06-19 17 57 24](https://cloud.githubusercontent.com/assets/126868/8263826/ad755d58-16ac-11e5-966e-f7a9be97ff28.png)\n\n_A GPS track (cyan) matched to the streets via a profile for cars (solid red line) and for pedestrians (dotted red line)._\n\n## Installation\nInclude mapbox-match.js after [Mapbox.js](https://github.com/mapbox/mapbox.js) in your html. Download the js files from the `dist` directory.\n\n<!--\nOr use the version on the [Mapbox Plugins CDN](http://mapbox.com/mapbox.js/plugins/#mapbox-mapmatch):\n\n```html\n<script src='//api.tiles.mapbox.com/mapbox.js/plugins/mapbox.match.js/v0.0.0/mapbox.match.min.js'></script>\n```\n-->\n\n## example\n\n```js\nL.mapbox.mapmatching(geojson, options, function (error, layer) {\n    layer.addTo(map);\n    layer.setStyle({\n        color: '#9a0202',\n        weight: 4,\n        opacity: 0.8\n    });\n});\n```\n\n## API\n\n### `L.mapbox.mapmatching(geojson, options, callback)`\n\nGiven a geojson object, returns a leaflet feature layer with the matched geometries. Since an asynchronous request is made for matching, you need to specify a callback function that runs when there is a successful response.\n\n### Options\n\nname | required? | description\n---- | --------- | -----------\n`profile` | required | Profile to match trace against. Options are `driving`, `walking` and `cycling`\n`mapMatchAPI` | optional | Custom API endpoint to query. Overrides the `profile` option`\n`gpsPrecision` | optional | Integer indicating the precision of the input geometries in metres (default: 5)\n`return` | optional | Type of object to return after matching. Options are `layer` (default) returns a leaflet featureLayer, `geojson` returns a geojson feature collection\n\n## Development\n\nThis is a [browserify](http://browserify.org/) project:\n\n```sh\ngit clone git@github.com:mapbox/mapbox-match.js.git\ncd mapbox-match.js\nnpm install\nnpm run build\n```\n\n`mapbox-match.js` and `mapbox-match.min.js` are **built files** generated\nfrom `index.js` by `browserify`. If you find an issue, it either needs to be\nfixed in `index.js`, or in one of the libraries mapbox-mapmatch uses\nto parse formats.\n\n##Algorithm\n1. Read an input geojson FeatureCollection\n2. Tidy the geojson using [geojson-tidy](https://github.com/mapbox/geojson-tidy)\n3. Match every feature using the [Mapbox Map Matching API](https://www.mapbox.com/developers/api/map-matching)\n4. Return a leaflet [featureLayer](https://www.mapbox.com/mapbox.js/api/v2.1.9/l-mapbox-featurelayer/) with the matched features or just a geojson object\n","maintainers":[{"email":"yannick.meeus+npm+production+ci@mapbox.com","name":"mbx-npm-ci-production"},{"email":"yannick.meeus+npm+staging+ci@mapbox.com","name":"mbx-npm-ci-staging"},{"email":"yannick.meeus+npm+prod+advanced+actions@mapbox.com","name":"mbx-npm-advanced-actions-production"},{"email":"yannick.meeus+npm+staging+advanced+actions@mapbox.com","name":"mbx-npm-advanced-actions-staging"},{"email":"yannick.meeus+npm+prod+09@mapbox.com","name":"mbx-npm-09-production"},{"email":"yannick.meeus+npm+prod+08@mapbox.com","name":"mbx-npm-08-production"},{"email":"yannick.meeus+npm+prod+07@mapbox.com","name":"mbx-npm-07-production"},{"email":"yannick.meeus+npm+prod+06@mapbox.com","name":"mbx-npm-06-production"},{"email":"yannick.meeus+npm+prod+05@mapbox.com","name":"mbx-npm-05-production"},{"email":"yannick.meeus+npm+prod+04@mapbox.com","name":"mbx-npm-04-production"},{"email":"yannick.meeus+npm+prod+03@mapbox.com","name":"mbx-npm-03-production"},{"email":"yannick.meeus+npm+prod+02@mapbox.com","name":"mbx-npm-02-production"},{"email":"yannick.meeus+npm+prod+01@mapbox.com","name":"mbx-npm-01-production"},{"email":"yannick.meeus@mapbox.com","name":"mbx-npm-02-staging"},{"email":"accounts+npmjs-01@mapbox.com","name":"mapbox-npm-01"},{"email":"accounts+npmjs-02@mapbox.com","name":"mapbox-npm-02"},{"email":"accounts+npmjs-07@mapbox.com","name":"mapbox-npm-07"},{"email":"accounts+npmjs-03@mapbox.com","name":"mapbox-npm-03"},{"email":"accounts+npmjs-04@mapbox.com","name":"mapbox-npm-04"},{"email":"accounts+npmjs-09@mapbox.com","name":"mapbox-npm-09"},{"email":"accounts+npmjs-05@mapbox.com","name":"mapbox-npm-05"},{"email":"accounts+npmjs-06@mapbox.com","name":"mapbox-npm-06"},{"email":"accounts+npmjs-08@mapbox.com","name":"mapbox-npm-08"},{"email":"accounts+npmjs-advanced-actions@mapbox.com","name":"mapbox-npm-advanced-actions"},{"email":"accounts+npmjs-npm-ci@mapbox.com","name":"mapbox-npm-ci"},{"email":"accounts+npmjs@mapbox.com","name":"mapbox-npm"},{"email":"accounts@mapbox.com","name":"mapbox-admin"},{"email":"accounts+npm-mapbox-machine-user@mapbox.com","name":"mapbox-machine-user"}],"time":{"modified":"2023-01-12T12:43:36.406Z","created":"2016-12-02T20:31:35.781Z","0.0.1":"2016-12-02T20:31:35.781Z"},"homepage":"https://github.com/mapbox/mapbox-match.js","keywords":["leaflet","mapmatch","align","geojson","osm","resample"],"repository":{"type":"git","url":"git+ssh://git@github.com/mapbox/mapbox-match.js.git"},"author":{"name":"Arun Ganesh"},"bugs":{"url":"https://github.com/mapbox/mapbox-match.js/issues"},"license":"MIT","readmeFilename":"README.md"}