geojs 1.8.2 → 1.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/main.yml +1 -0
- package/CHANGELOG.md +19 -0
- package/geo.js +332 -102
- package/geo.lean.js +330 -100
- package/geo.lean.min.js +2 -2
- package/geo.min.js +6 -6
- package/package.json +8 -8
- package/src/annotation.js +153 -52
- package/src/annotationLayer.js +28 -13
- package/src/fetchQueue.js +50 -11
- package/src/tileLayer.js +18 -2
- package/src/util/common.js +6 -1
package/src/util/common.js
CHANGED
|
@@ -603,13 +603,18 @@ var util = {
|
|
|
603
603
|
* this is the same as the average of all the points of the lines of the
|
|
604
604
|
* perimeter.
|
|
605
605
|
*
|
|
606
|
-
* @param {geo.
|
|
606
|
+
* @param {geo.geoPolygon} coor An array of coordinates. This can also be
|
|
607
|
+
* a polygon object with an ``outer`` element with an array of
|
|
608
|
+
* coordinates.
|
|
607
609
|
* @returns {geo.geoPosition|undefined} The position for the center, or
|
|
608
610
|
* `undefined` if no such position exists.
|
|
609
611
|
* @memberof geo.util
|
|
610
612
|
*/
|
|
611
613
|
centerFromPerimeter: function (coor) {
|
|
612
614
|
var position, p0, p1, w, sumw, i;
|
|
615
|
+
if (coor && coor.outer) {
|
|
616
|
+
coor = coor.outer;
|
|
617
|
+
}
|
|
613
618
|
if (!coor || !coor.length) {
|
|
614
619
|
return;
|
|
615
620
|
}
|