@artstesh/maps 3.1.3 → 3.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/esm2020/map/models/polygon.model.mjs +4 -1
- package/dist/esm2020/src/map/models/polygon.model.mjs +4 -1
- package/dist/fesm2015/maps-components-src-map.mjs +4 -2
- package/dist/fesm2015/maps-components-src-map.mjs.map +1 -1
- package/dist/fesm2015/maps-components.mjs +4 -2
- package/dist/fesm2015/maps-components.mjs.map +1 -1
- package/dist/fesm2020/maps-components-src-map.mjs +2 -0
- package/dist/fesm2020/maps-components-src-map.mjs.map +1 -1
- package/dist/fesm2020/maps-components.mjs +2 -0
- package/dist/fesm2020/maps-components.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -156,11 +156,13 @@ class MarkerModel {
|
|
|
156
156
|
|
|
157
157
|
class PolygonModel {
|
|
158
158
|
constructor(feature, id, info) {
|
|
159
|
-
var _a;
|
|
159
|
+
var _a, _b;
|
|
160
160
|
this.info = info;
|
|
161
161
|
this.id = id == null ? IdGenerator.get() : id;
|
|
162
162
|
this._feature = feature;
|
|
163
|
-
|
|
163
|
+
if (this.info)
|
|
164
|
+
(_a = this._feature) === null || _a === void 0 ? void 0 : _a.set(MapConstants.FeatureInfo, this.info);
|
|
165
|
+
[this.lng, this.lat] = getCenter((_b = this._feature.getGeometry()) === null || _b === void 0 ? void 0 : _b.getExtent());
|
|
164
166
|
}
|
|
165
167
|
static fromGeoJson(id, json, info) {
|
|
166
168
|
let feature = new GeoJSON().readFeature(json);
|