Skip to content
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

Add L.PM.Utils.pxRadiusToMeterRadius #1007

Merged
merged 5 commits into from
Oct 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1061,12 +1061,13 @@ The following events are available on a map instance:

The following methods are available on `L.PM.Utils`:

| Method | Returns | Description |
| :------------------------------------------------------------ | :-------- | :----------------------------------------------------------------------------------------------------------- |
| calcMiddleLatLng(`map`, `latlng1`, `latlng2`) | `LatLng` | Returns the middle LatLng between two LatLngs. |
| getTranslation(`path`) | `String` | Returns the translation of the passed `path`. path = json-string f.ex. `tooltips.placeMarker`. |
| findLayers(`map`) | `Array` | Returns all layers that are available for Leaflet-Geoman. |
| circleToPolygon(`circle`, `sides = 60`, `withBearing = true`) | `Polygon` | Converts a circle into a polygon with default 60 sides. For CRS.Simple maps `withBearing` needs to be false. |
| Method | Returns | Description |
| :------------------------------------------------------------ | :-------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------- |
| calcMiddleLatLng(`map`, `latlng1`, `latlng2`) | `LatLng` | Returns the middle LatLng between two LatLngs. |
| getTranslation(`path`) | `String` | Returns the translation of the passed `path`. path = json-string f.ex. `tooltips.placeMarker`. |
| findLayers(`map`) | `Array` | Returns all layers that are available for Leaflet-Geoman. |
| circleToPolygon(`circle`, `sides = 60`, `withBearing = true`) | `Polygon` | Converts a circle into a polygon with default 60 sides. For CRS.Simple maps `withBearing` needs to be false. |
| pxRadiusToMeterRadius(`radiusInPx`, `map`, `center`) | `Number` | Converts a px-radius (CircleMarker) to meter-radius (Circle). The center LatLng is needed because the earth has different projections on different places. |

### Keyboard

Expand Down
Loading