@vtx/map 1.0.8 → 1.0.9
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 +9 -5
- package/package.json +1 -1
package/lib/VtxMap/BMap/Map.js
CHANGED
|
@@ -1242,12 +1242,16 @@ var BaiduMap = function (_React$Component) {
|
|
|
1242
1242
|
var t = this;
|
|
1243
1243
|
bdNames.forEach(function (name) {
|
|
1244
1244
|
t._boundary.get(name, function (ary) {
|
|
1245
|
-
var
|
|
1246
|
-
|
|
1247
|
-
|
|
1245
|
+
var arr = [];
|
|
1246
|
+
ary.boundaries.forEach(function (item) {
|
|
1247
|
+
var id = 'boundary' + new Date().getTime() + Math.random();
|
|
1248
|
+
var paths = item.split(';').map(function (item, index) {
|
|
1249
|
+
return item.split(',');
|
|
1250
|
+
});
|
|
1251
|
+
arr.push({ id: id, rings: paths, name: name });
|
|
1252
|
+
t.state.boundaryInfo.push({ id: id, name: name });
|
|
1248
1253
|
});
|
|
1249
|
-
t.addPolygon(
|
|
1250
|
-
t.state.boundaryInfo.push({ id: id, name: name });
|
|
1254
|
+
t.addPolygon(arr);
|
|
1251
1255
|
});
|
|
1252
1256
|
});
|
|
1253
1257
|
}
|