mapbox / mapbox-isochrone

Isochrone generator built atop the Mapbox Matrix API, with CONREC polygonization.
MIT License
119 stars 28 forks source link

Not able to use it #9

Closed radtech closed 6 years ago

radtech commented 6 years ago

I imported the file app.js in code. and tried passing

`var state = { token: '', debug: window.location.search.indexOf('debug')>-1, mode: 'driving', direction:'divergent', threshold: 3600, resolution: 1.5, batchSize: 400, inspector: false };

isochrone([12.957194522,77.5682954863], state, function(output){ console.log(output); })`

but I am getting an error Uncaught TypeError: Cannot read property 'durations' of undefined at Object. (app.js:157) at Dispatch.call (app.js:2266) at XMLHttpRequest.respond (app.js:2516)

my call is https://api.mapbox.com/directions-matrix/v1/mapbox/driving/12.9572,77.5683;12.9572,77.5683;12.9572,77.5873;13.0454,77.5683;13.0454,77.5873?sources=0&destinations=all&access_token=

I am new to this and jsin particular kindly help me.

mikelinc commented 6 years ago

I've been getting this same error intermittently. (maybe 1 time out of 5) Did you ever resolve this issue?

peterqliu commented 6 years ago

@mikelinc this is likely because you're rate-limited -- non-enterprise plans are unfortunately capped at 60 Matrix requests per second

peterqliu commented 6 years ago

I just merged a PR that addresses/alleviates some of these relevant troubles #14