@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.
@@ -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
- if (ary[0] instanceof Array) {
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 < ary.length; i++) {
1643
- a = new BMap.Point(ary[i][0], ary[i][1]);
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtx/map",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "@vtx/map",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {