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

NaN in tile parameters #9

Open
lavahot opened this issue Jan 23, 2016 · 4 comments
Open

NaN in tile parameters #9

lavahot opened this issue Jan 23, 2016 · 4 comments

Comments

@lavahot
Copy link

lavahot commented Jan 23, 2016

When using browserify to create a bundle suitable for browsers, at some point along the line the z, x, and y parameters are passed NaN. This, of course, fails.

@anandthakker
Copy link
Contributor

Hmm, could you provide some more context? I've definitely used vt-geojson with browserify without problems, so maybe there's something more specific causing the problem...

@lavahot
Copy link
Author

lavahot commented Jan 25, 2016

Thanks for responding so quickly. The exact URI I pass to vtgeojson is: "tilejson+https://api.mapbox.com/v4/" + {map_name} + ".json?access_token=" + {access_key}.
My options are set as: { bounds: {A turf.js generated feature collection}, strict: true }

@lavahot
Copy link
Author

lavahot commented Jan 27, 2016

More specifically, the tilejson resolves to this source: https://a.tiles.mapbox.com:80/v4/MAP_NAME/NaN/NaN/NaN.vector.pbf?access_token=ACCESS_TOKEN, which results in a protocol error (which I also raised an issue for), but when the port specifier is removed, results in a 404.

@lavahot
Copy link
Author

lavahot commented Jan 27, 2016

So I narrowed it down to something in tile-cover that is generating the tile indexes. The cover.tiles() calls are apparently not working correctly, even when valid GeoJSON are being passed to them. I'm not sure if it will help, but it looks like the dependency is out of date at 2.4.1, whereas the latest is 3.0.1. I tried to fix this in #11, but it looks like updating the outdated packages breaks a bunch of things. I have to put this on the back burner for now, but I know I'll need this functionality eventually so I might come back and debug those breaks.

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

2 participants