<commit_before>[![Build Status](https://travis-ci.org/mapbox/mapbox-map-matching.js.svg)](https://travis-ci.org/mapbox/mapbox/mapbox-map-matching.js)

# mapbox-map-matching.js

[Mapbox.js](https://github.com/mapbox/mapbox.js) plugin to match input geojson geometries to Openstreetmap streets using the [Mapbox map-matching API]().

GPS tracks(cyan) matched using a car and foot profile(dashed).
![untitled](https://cloud.githubusercontent.com/assets/126868/8263771/04e9d83a-16ac-11e5-943f-884e70686989.gif)![screenshot 2015-06-19 17 57 24](https://cloud.githubusercontent.com/assets/126868/8263826/ad755d58-16ac-11e5-966e-f7a9be97ff28.png)

## Installation
Inlcude mapbox-map-matching.js after [Mapbox.js](https://github.com/mapbox/mapbox.js) in your html. Download the js files from the `dist` directory..

<!--
Or use the version on the [Mapbox Plugins CDN](http://mapbox.com/mapbox.js/plugins/#mapbox-mapmatch):

```html
<script src='//api.tiles.mapbox.com/mapbox.js/plugins/mapbox.map-matching.js/v0.0.0/mapbox.map-matching.min.js'></script>
```
-->

## example

```js
L.mapbox.mapmatching(geojson, options, function (error, layer) {
    layer.addTo(map);
    layer.setStyle({
        color: '#9a0202',
        weight: 4,
        opacity: 0.8
    });
});
```

## API

### `L.mapbox.mapmatching(geojson, options?, callback)`

Given 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.
<commit_msg>Readme: Only use one image<commit_after>[![Build Status](https://travis-ci.org/mapbox/mapbox-map-matching.js.svg)](https://travis-ci.org/mapbox/mapbox/mapbox-map-matching.js)

# mapbox-map-matching.js

[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).

![screenshot 2015-06-19 17 57 24](https://cloud.githubusercontent.com/assets/126868/8263826/ad755d58-16ac-11e5-966e-f7a9be97ff28.png)

_A GPS track (cyan) matched to the streets via a profile for cars (solid red line) and for pedestrians (dotted red line)._

## Installation
Inlcude mapbox-map-matching.js after [Mapbox.js](https://github.com/mapbox/mapbox.js) in your html. Download the js files from the `dist` directory..

<!--
Or use the version on the [Mapbox Plugins CDN](http://mapbox.com/mapbox.js/plugins/#mapbox-mapmatch):

```html
<script src='//api.tiles.mapbox.com/mapbox.js/plugins/mapbox.map-matching.js/v0.0.0/mapbox.map-matching.min.js'></script>
```
-->

## example

```js
L.mapbox.mapmatching(geojson, options, function (error, layer) {
    layer.addTo(map);
    layer.setStyle({
        color: '#9a0202',
        weight: 4,
        opacity: 0.8
    });
});
```

## API

### `L.mapbox.mapmatching(geojson, options?, callback)`

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

{'fraction_non_alphanumeric': 0.14734836456017783, 'fraction_numerical': 0.04795173070816132, 'mean_word_length': 4.294117647058823, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 12, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6996589', 'n_tokens_mistral': 1208, 'n_tokens_neox': 1079, 'n_words': 249}