@artstesh/maps 1.1.3 → 1.1.4
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/dist/bundles/maps-components-src-map.umd.js +5 -3
- package/dist/bundles/maps-components-src-map.umd.js.map +1 -1
- package/dist/bundles/maps-components.umd.js +5 -3
- package/dist/bundles/maps-components.umd.js.map +1 -1
- package/dist/esm2015/map/models/polygon.model.js +6 -3
- package/dist/esm2015/src/map/models/polygon.model.js +6 -3
- package/dist/fesm2015/maps-components-src-map.js +4 -2
- package/dist/fesm2015/maps-components-src-map.js.map +1 -1
- package/dist/fesm2015/maps-components.js +4 -2
- package/dist/fesm2015/maps-components.js.map +1 -1
- package/package.json +1 -1
|
@@ -645,12 +645,14 @@
|
|
|
645
645
|
|
|
646
646
|
var PolygonModel = /** @class */ (function () {
|
|
647
647
|
function PolygonModel(feature, id, info) {
|
|
648
|
-
var
|
|
649
|
-
var _a;
|
|
648
|
+
var _c;
|
|
649
|
+
var _a, _b;
|
|
650
650
|
this.info = info;
|
|
651
651
|
this.id = id == null ? IdGenerator.get() : id;
|
|
652
652
|
this._feature = feature;
|
|
653
|
-
|
|
653
|
+
if (this.info)
|
|
654
|
+
(_a = this._feature) === null || _a === void 0 ? void 0 : _a.set(MapConstants.FeatureInfo, this.info);
|
|
655
|
+
_c = __read(extent.getCenter((_b = this._feature.getGeometry()) === null || _b === void 0 ? void 0 : _b.getExtent()), 2), this.lng = _c[0], this.lat = _c[1];
|
|
654
656
|
}
|
|
655
657
|
PolygonModel.fromGeoJson = function (id, json, info) {
|
|
656
658
|
var feature = new format.GeoJSON().readFeature(json);
|