Distance expression operator
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
It would be nice to have an expression operator that evaluates to the physical distance between two geographic coordinates. Coupled with an operator that evaluates to the centroid of the current feature and even the ability to apply a gradient to a shape (#4095), it would enable interesting visualizations that draw the viewer’s attention to a particular feature. A more mundane use case would be displaying the distance of each city on the map as you hover over a particular city.
This request is inspired by the `distanceToLocation:fromLocation:(there, here)` function built into NSExpression on iOS and macOS, which returns the distance in meters from the coordinate _there_ to the coordinate _here_.
/cc @anandthakker
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.