| | |
| | | }
|
| | | // 显示所有矩形
|
| | | showAllPolygon() {
|
| | | console.log("this.dataSource", this.dataSource);
|
| | | this.dataSource.forEach((item: any) => {
|
| | | if (item.bdValues) {
|
| | | let pointList = item.bdValues.map((item: any) => {
|
| | | return new BMapGL.Point(item.lng, item.lat);
|
| | | });
|
| | | let polygon = new BMapGL.Polygon([...pointList]);
|
| | | console.log("polygon", polygon);
|
| | | this.map.addOverlay(polygon);
|
| | | }
|
| | | let macType = null;
|
| | | if (this.carvalue !== "请选择走航车") {
|
| | | macType = this.carvalue;
|
| | | }
|
| | | get("coordinate/selectCruiserRoad", {
|
| | | name: this.selectLuName,
|
| | | mac: macType,
|
| | | }).then((res) => {
|
| | | res.data.data.forEach((item: any) => {
|
| | | if (item.bdValues) {
|
| | | let pointList = item.bdValues.map((item: any) => {
|
| | | return new BMapGL.Point(item.lng, item.lat);
|
| | | });
|
| | | let polygon = new BMapGL.Polygon([...pointList]);
|
| | | console.log("polygon", polygon);
|
| | | this.map.addOverlay(polygon);
|
| | | }
|
| | | });
|
| | | });
|
| | | }
|
| | | // 显示矩形
|