Closed rhagigi closed 7 years ago
oh -- I think I found the bug.
https://github.com/mapbox/node-s2/blob/master/src/s2.cc#L67
if (coverConfiguration->min_level != std::numeric_limits<int>::min()) {
coverer.set_min_level(coverConfiguration->level_mod);
}
When calling:
I get back cells ranging in level from 5 to 16
but when I use
I get back what I expect, cells all in level 16.
I looked through the code and it seems like when generating a synchronous cover, it directly calls the coverers set_min_level with the value passed in on the options object. For the async cover, it sets the values on an object and then passes that through to the Cover Worker. I know that the values are being passed through because on the OK callback (in the worker), result_type value is used correctly (you can set
token
as a the result_type and it does change the result type to tokens). So the issue seems to be on the wrapping and unwrapping.If I had to guess, somehow
isn't passing. But honestly unsure.