isobit-ui 0.0.163 → 0.0.164
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 +8 -7
- 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.164
|
|
3
3
|
* (c) Erik Alarcon Pinedo
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -3670,23 +3670,24 @@ var script$2 = {
|
|
|
3670
3670
|
addFeature: function addFeature(f, cfg) {
|
|
3671
3671
|
f = f ? f : {};
|
|
3672
3672
|
var me = this,
|
|
3673
|
-
|
|
3673
|
+
point,
|
|
3674
3674
|
map = me.map;
|
|
3675
3675
|
|
|
3676
3676
|
if (f.lon && f.lat) {
|
|
3677
3677
|
var c = [f.lon, f.lat];
|
|
3678
|
-
|
|
3678
|
+
point = new ol.geom.Point(c[0] > -100 ? ol.proj.fromLonLat(c) : c);
|
|
3679
3679
|
} else {
|
|
3680
|
-
|
|
3680
|
+
point = new ol.geom.Point(map.getView().getCenter());
|
|
3681
3681
|
}
|
|
3682
3682
|
|
|
3683
|
-
c =
|
|
3683
|
+
c = point.flatCoordinates;
|
|
3684
3684
|
var c = c[0] < -10000 ? ol.proj.toLonLat(c) : c;
|
|
3685
3685
|
me.$emit('translateend', {
|
|
3686
3686
|
lon: c[0],
|
|
3687
3687
|
lat: c[1]
|
|
3688
3688
|
});
|
|
3689
|
-
f.geometry =
|
|
3689
|
+
f.geometry = point;
|
|
3690
|
+
console.log(f);
|
|
3690
3691
|
var feature = new ol.Feature(f);
|
|
3691
3692
|
feature.data = f;
|
|
3692
3693
|
|
|
@@ -3711,7 +3712,7 @@ var script$2 = {
|
|
|
3711
3712
|
}
|
|
3712
3713
|
|
|
3713
3714
|
feature.setStyle(me.styleMap[f.style ? f.style : 'default']);
|
|
3714
|
-
c =
|
|
3715
|
+
c = point.flatCoordinates;
|
|
3715
3716
|
c = c[0] < -10000 ? ol.proj.toLonLat(c) : c;
|
|
3716
3717
|
me.$emit('translateend', {
|
|
3717
3718
|
lon: c[0],
|