@vtx/map 1.0.7 → 1.0.8
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/lib/VtxMap/BMap/Map.js +15 -3
- package/package.json +1 -1
package/lib/VtxMap/BMap/Map.js
CHANGED
|
@@ -1633,16 +1633,28 @@ var BaiduMap = function (_React$Component) {
|
|
|
1633
1633
|
break;
|
|
1634
1634
|
}
|
|
1635
1635
|
|
|
1636
|
+
/**
|
|
1637
|
+
* 用法
|
|
1638
|
+
* map.setVisiblePoints('lng,lat;lng,lat')
|
|
1639
|
+
*/
|
|
1636
1640
|
if (typeof arg === 'string') {
|
|
1637
1641
|
ary = arg.split(',');
|
|
1638
1642
|
obj = t.getFitView(ary);
|
|
1639
1643
|
} else if (arg instanceof Array) {
|
|
1640
|
-
|
|
1644
|
+
/**
|
|
1645
|
+
* 用法
|
|
1646
|
+
* map.setVisiblePoints([[lng,lat],[lng,lat]])
|
|
1647
|
+
*/
|
|
1648
|
+
if (arg[0] instanceof Array) {
|
|
1641
1649
|
var a = [];
|
|
1642
|
-
for (var i = 0; i <
|
|
1643
|
-
a
|
|
1650
|
+
for (var i = 0; i < arg.length; i++) {
|
|
1651
|
+
a.push(new BMap.Point(arg[i][0], arg[i][1]));
|
|
1644
1652
|
}
|
|
1645
1653
|
obj = t.state.gis.getViewport(a);
|
|
1654
|
+
/**
|
|
1655
|
+
* 用法
|
|
1656
|
+
* map.setVisiblePoints(['lng,lat','lng,lat'])
|
|
1657
|
+
*/
|
|
1646
1658
|
} else {
|
|
1647
1659
|
obj = t.getFitView(arg);
|
|
1648
1660
|
}
|