-
Notifications
You must be signed in to change notification settings - Fork 151
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
return best distance #2
Labels
Comments
Closed
Another useful application of this would be variable size labels. That would be super cool. |
Where would I make this edit in the polylabel code? |
This would be nice to have. At the moment, I'm looking at the MultiPolygon label placement problem. Approach for now: show labels only for the polygon with the largest area, within a given MultiPolygon. FWIW I'd vote for Non-breaking change 1. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
it would be super useful in many cases to know what the best distance was, for example to decide whether or not to display a label, or to use in other computations.
Non-breaking change 1:
var r = [bestCell.x, bestCell.y]; r.distance = bestCell.d; return r;
Not-too-much-breaking change 2:
return [bestCell.x, bestCell.y, bestCell.d];
1 is probably nicer but some developers might find the array/object mix awkward to work with.
The text was updated successfully, but these errors were encountered: