From 4c99ab95e0449348d938ec0ceb949bceafb0cfda Mon Sep 17 00:00:00 2001
From: fengxiang <110431245@qq.com>
Date: Fri, 03 Aug 2018 16:56:33 +0800
Subject: [PATCH] 设备数据和 地图相关
---
src/app/routes/sand-table/sand-table.component.ts | 50 +++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 45 insertions(+), 5 deletions(-)
diff --git a/src/app/routes/sand-table/sand-table.component.ts b/src/app/routes/sand-table/sand-table.component.ts
index bb30bb4..e74bc88 100644
--- a/src/app/routes/sand-table/sand-table.component.ts
+++ b/src/app/routes/sand-table/sand-table.component.ts
@@ -1,17 +1,57 @@
import { Component, OnInit } from '@angular/core';
import { _HttpClient } from '@delon/theme';
+import { MapOptions, HeatmapData, HeatmapOptions, NavigationControlOptions, ControlAnchor, NavigationControlType } from 'angular2-baidu-map';
@Component({
selector: 'app-sand-table',
templateUrl: './sand-table.component.html',
})
export class SandTableComponent implements OnInit {
-
+ options: MapOptions;
+ private _map: any;
constructor(
private http: _HttpClient
- ) { }
-
- ngOnInit() {
+ ) {
+ this.options = {
+ minZoom: 3,
+ maxZoom: 13,
+ cursor: 'default',
+ centerAndZoom: {
+ lng: 121,
+ lat: 31.4,
+ zoom: 17
+ },
+ mapType: window['BMAP_SATELLITE_MAP'],
+ enableKeyboard: true
+ };
}
-
+ loadMap(map: any) {
+ this._map = map;
+ }
+ navigationOpts: NavigationControlOptions;
+ //���������
+ heatData: HeatmapData = {
+ data: [
+ {"lng":121,"lat":31.4,"count":99},
+ {"lng":121.02,"lat":31.38,"count":95},
+ {"lng":120.96,"lat":31.39,"count":95},
+ ],
+ max: 100
+ };
+ heatOption: HeatmapOptions = {
+ radius: 100
+ };
+ heatmapOverlay :any;
+ /**
+ * loadHeatmap
+ */
+ public loadHeatmap(heatmapOverlay) {
+ this.heatmapOverlay = heatmapOverlay;
+ }
+ ngOnInit() {
+ this.navigationOpts = {
+ anchor: ControlAnchor.BMAP_ANCHOR_BOTTOM_RIGHT,
+ type: NavigationControlType.BMAP_NAVIGATION_CONTROL_LARGE
+ };
+ }
}
--
Gitblit v1.8.0