|
@@ -1748,40 +1748,40 @@ export default {
|
|
{},
|
|
{},
|
|
{},
|
|
{},
|
|
"post"
|
|
"post"
|
|
- ).then(() => {
|
|
|
|
- // this.markPoints = res.data;
|
|
|
|
|
|
+ ).then((res) => {
|
|
|
|
+ this.markPoints = res.data;
|
|
// 数据拟真 先写死 后期维护一个计算聚合点位的算法函数
|
|
// 数据拟真 先写死 后期维护一个计算聚合点位的算法函数
|
|
// 添加打点
|
|
// 添加打点
|
|
if (this.map) {
|
|
if (this.map) {
|
|
- setTimeout(() => {
|
|
|
|
- const data1 = [
|
|
|
|
- { longitude: 116.05, latitude: 39.7, count: 50 },
|
|
|
|
- { longitude: 116.39, latitude: 39.8, count: 113 },
|
|
|
|
- { longitude: 116.53, latitude: 39.99, count: 88 },
|
|
|
|
- ]
|
|
|
|
- const data2 = [
|
|
|
|
- { longitude: 116.01, latitude: 39.5, count: 12 },
|
|
|
|
- { longitude: 116.12, latitude: 39.95, count: 16 },
|
|
|
|
- { longitude: 116.23, latitude: 39.6, count: 6 },
|
|
|
|
- { longitude: 116.34, latitude: 39.85, count: 6 },
|
|
|
|
- { longitude: 116.45, latitude: 39.7, count: 3 },
|
|
|
|
- { longitude: 116.56, latitude: 39.75, count: 12 },
|
|
|
|
- { longitude: 116.67, latitude: 39.98, count: 3 },
|
|
|
|
- { longitude: 116.78, latitude: 39.89, count: 12 }
|
|
|
|
- ]
|
|
|
|
- this.lcvs = new CTMapOl.extend.LayeredClusterViewShed(this.map.map, [
|
|
|
|
- { data: this.transformProj(data1), maxZoom: 10, onClick: data => { console.log(data) } },
|
|
|
|
- { data: this.transformProj(data2), minZoom: 10, maxZoom: 12, onClick: data => { console.log(data) } },
|
|
|
|
- { data: this.transformProj(makeRandomData(3000)),minZoom: 12, onClick: data => { console.log(data) }}
|
|
|
|
- ], {
|
|
|
|
- minViewShed: 12,
|
|
|
|
- })
|
|
|
|
- })
|
|
|
|
- // if (this.mapType === "3D") {
|
|
|
|
- // this.addPoint3D(this.map);
|
|
|
|
- // } else {
|
|
|
|
- // this.addPoint(this.map.map);
|
|
|
|
- // }
|
|
|
|
|
|
+ // setTimeout(() => {
|
|
|
|
+ // const data1 = [
|
|
|
|
+ // { longitude: 116.05, latitude: 39.7, count: 50 },
|
|
|
|
+ // { longitude: 116.39, latitude: 39.8, count: 113 },
|
|
|
|
+ // { longitude: 116.53, latitude: 39.99, count: 88 },
|
|
|
|
+ // ]
|
|
|
|
+ // const data2 = [
|
|
|
|
+ // { longitude: 116.01, latitude: 39.5, count: 12 },
|
|
|
|
+ // { longitude: 116.12, latitude: 39.95, count: 16 },
|
|
|
|
+ // { longitude: 116.23, latitude: 39.6, count: 6 },
|
|
|
|
+ // { longitude: 116.34, latitude: 39.85, count: 6 },
|
|
|
|
+ // { longitude: 116.45, latitude: 39.7, count: 3 },
|
|
|
|
+ // { longitude: 116.56, latitude: 39.75, count: 12 },
|
|
|
|
+ // { longitude: 116.67, latitude: 39.98, count: 3 },
|
|
|
|
+ // { longitude: 116.78, latitude: 39.89, count: 12 }
|
|
|
|
+ // ]
|
|
|
|
+ // this.lcvs = new CTMapOl.extend.LayeredClusterViewShed(this.map.map, [
|
|
|
|
+ // { data: this.transformProj(data1), maxZoom: 10, onClick: data => { console.log(data) } },
|
|
|
|
+ // { data: this.transformProj(data2), minZoom: 10, maxZoom: 12, onClick: data => { console.log(data) } },
|
|
|
|
+ // { data: this.transformProj(makeRandomData(3000)),minZoom: 12, onClick: data => { console.log(data) }}
|
|
|
|
+ // ], {
|
|
|
|
+ // minViewShed: 12,
|
|
|
|
+ // })
|
|
|
|
+ // })
|
|
|
|
+ if (this.mapType === "3D") {
|
|
|
|
+ this.addPoint3D(this.map);
|
|
|
|
+ } else {
|
|
|
|
+ this.addPoint(this.map.map);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
});
|
|
});
|
|
// 添加打点
|
|
// 添加打点
|