isobit-ui 0.0.167 → 0.0.171
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/index.js +14 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* isobit-ui v0.0.
|
|
2
|
+
* isobit-ui v0.0.171
|
|
3
3
|
* (c) Erik Alarcon Pinedo
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -3738,24 +3738,26 @@ var script$2 = {
|
|
|
3738
3738
|
lat: c[1]
|
|
3739
3739
|
});
|
|
3740
3740
|
|
|
3741
|
-
if (layer != null) {
|
|
3742
|
-
var layer = map.getLayerById();
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3741
|
+
if (f.layer != null) {
|
|
3742
|
+
var layer = map.getLayerById(f.layer);
|
|
3743
|
+
|
|
3744
|
+
if (!layer) {
|
|
3745
|
+
map.addLayer(new ol.layer.Vector({
|
|
3746
|
+
id: f.layer,
|
|
3747
|
+
source: new ol.source.Vector({
|
|
3748
|
+
features: new ol.Collection([feature])
|
|
3749
|
+
})
|
|
3750
|
+
}));
|
|
3751
|
+
} else layer.getSource().addFeatures(feature);
|
|
3749
3752
|
} else me.collection.push(feature);
|
|
3750
3753
|
|
|
3751
3754
|
if (cfg) {
|
|
3752
|
-
console.log('animate');
|
|
3753
3755
|
console.log(feature.getGeometry().getCoordinates());
|
|
3754
|
-
me.map.getView().animate({
|
|
3756
|
+
me.map.getView().animate(Object.assign({
|
|
3755
3757
|
center: feature.getGeometry().getCoordinates(),
|
|
3756
3758
|
zoom: 17,
|
|
3757
3759
|
duration: 500
|
|
3758
|
-
});
|
|
3760
|
+
}, cfg));
|
|
3759
3761
|
}
|
|
3760
3762
|
|
|
3761
3763
|
return feature;
|