2

I'm trying to understand why turf.envelope() returns 5 coordinate arrays. I'd expect to see only 4. Is this normal/expected behavior?

I ask because I'm currently trying to debug an issue I'm having while setting a bounding box in MapBox after being supplied x amount of coordinate arrays from the draw control from the draw.update event and I'm wondering if this may be the culprit.

I'm leaning toward having 5 coordinate arrays being returned not being the issue, because everything functions as expected when processing the draw.create event.

1
  • my guess is that the fifth point represents the center of the envelop – LaughU Nov 1 '17 at 13:42
6

It is returning a polygon which must have the start and end point the same to close the polygon.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.