You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,8 @@ Leaflet.Geodesic is available from [unpkg](https://unpkg.com/browse/leaflet.geod
22
22
23
23
Add it in your nodejs-project with `npm i leaflet.geodesic`.
24
24
25
+
If possible, pin the plug-in to a specific version and use [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity). Check the [release page](https://github.com/henrythasler/Leaflet.Geodesic/releases) for the latest version, links and checksum. A checksum can by verified with `npm run build`, is stored in `dist/leaflet.geodesic.umd.min.js.sha256` on [jsDelivr](https://www.jsdelivr.com/package/npm/leaflet.geodesic?path=dist) and [unpkg](https://unpkg.com/browse/leaflet.geodesic@2.5.1/dist/leaflet.geodesic.umd.min.js.sha256) and is shown in the [build-log](https://travis-ci.org/henrythasler/Leaflet.Geodesic/builds) for a tagged version.
26
+
25
27
## Basic usage
26
28
27
29
-`L.Geodesic` draws geodesic lines between all points of a given line- or multiline-string.
@@ -164,8 +166,8 @@ const Berlin = new L.LatLng(52.5, 13.35);
164
166
constLosAngeles=newL.LatLng(33.82, -118.38);
165
167
constBeijing=newL.LatLng(39.92, 116.39);
166
168
167
-
constgeodesic=newL.Geodesic([Berlin, LosAngeles]).addTo(map);// add empty object to the map
geodesic.addLatLng(Beijing); // results in [[Berlin, LosAngeles, Beijing]
169
171
```
170
172
171
173
The new point will always be added to the last linestring of a multiline. You can define a specific linestring to add to by reading the `points` property before and hand over a specific linestring as second parameter:
@@ -227,7 +229,7 @@ The geometry of a circle can be updated with the following methods:
227
229
-`setLatLng(latlng: L.LatLngExpression)` - set a new center
228
230
-`setRadius(radius: number)` - update the radius
229
231
230
-
Handling of circles crossing the antimeridian (wrapping) is not yet supported.
232
+
Handling of **filled**circles crossing the antimeridian (wrapping) is not yet supported. Set `fill: false` in these cases to avoid display artefacts.
0 commit comments