mapbox / mapbox-isochrone

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

keepIslands defaults to number #17

Closed rogertsui0923 closed 6 years ago

rogertsui0923 commented 6 years ago

First of all, thanks for the amazing library! I ran into an issue where, when I made 2 consecutive calls to isochrone, I received the error keepIslands must be a boolean. I noticed that in https://github.com/mapbox/mapbox-isochrone/blob/master/isochrone.js#L432

parameters[key] = item.default || computeResolution()

as the default for keepIslands is false, it seems that the parameter is being set to a number.

peterqliu commented 6 years ago

@rogertsui0923 thank you for the catch! that was an improper default handling on my part. fixed in https://github.com/mapbox/mapbox-isochrone/commit/ef3b7c1fc8714116c3d87e785fd23161cd9bc3f3

Please reopen if this issue persists. Thanks!