Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to use it #9

Closed
radtech opened this issue Dec 23, 2017 · 3 comments
Closed

Not able to use it #9

radtech opened this issue Dec 23, 2017 · 3 comments

Comments

@radtech
Copy link

radtech commented Dec 23, 2017

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.

@radtech radtech closed this as completed Dec 23, 2017
@mikelinc
Copy link

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

@peterqliu
Copy link
Contributor

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

@peterqliu
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants