mapbox / polylabel

A fast algorithm for finding the pole of inaccessibility of a polygon (in JavaScript and C++)
Other
1.44k stars 151 forks source link

Return best distance #14

Closed anandthakker closed 4 years ago

anandthakker commented 8 years ago

Closes #2

@mourner dunno if you actually want this in, but I needed it for something so here ya go

TWiStErRob commented 8 years ago

Why not swallow the "breaking change" and bump the version number accordingly?

return {x: bestCell.x, y: bestCell.y, distance: bestCell.d};
anandthakker commented 8 years ago

I have no personal opinion on this question -- attaching distance to an array, switching to an object, switching to a 3-element array all seem fine to me. I'll leave it to @mourner to state a preference.

curran commented 7 years ago

This would be a cool feature to have. I'd say the property on the array is fine.

anandthakker commented 7 years ago

Closing this as stale.

TWiStErRob commented 7 years ago

So what about #2? The fix is here, a button press away; someone just needs to own the decision of what format to use.

jolars commented 6 years ago

I would love to see this implemented so that there might be a solution for multiPolygons.

mourner commented 4 years ago

Superceded by #61