mapbox / mapbox-match.js

A plugin to align geometries to streetmap data
Other
34 stars 6 forks source link

Make map display optional and/or accept options #6

Closed freenerd closed 9 years ago

freenerd commented 9 years ago

If I understand https://github.com/mapbox/leaflet-mapmatch//blob/b0740a68c7f735607c5353be6114e51fc2d8f9ba/index.js#L59 correctly, then we are always mapping the returned features directly on the map. We'll want to give the user more control here:

Best would be supporting both I guess.

planemad commented 9 years ago

@freenerd to clarify, you mean one can request for just the matchedGeometeries FeatureCollection?

freenerd commented 9 years ago
mapmatch(geojson, function(err, features) {
  // let me do something with the features here, e.g. only use ones with high confidence
  var good_features = $(features).filter(function(f) { return f.properties.confidence > 0.8; });
})
planemad commented 9 years ago

@freenerd :+1: will do this

planemad commented 9 years ago

options available now as documented in the readme