| * @returns {{intensity: number, size: (*|number), x: number, y: number}} | * @returns {{intensity: number, size: (*|number), x: number, y: number}} | ||||
| * @private | * @private | ||||
| */ | */ | ||||
| _paserPosition(position) { | |||||
| _parsePosition(position) { | |||||
| let point = WMP.project( | let point = WMP.project( | ||||
| Cesium.Cartographic.fromDegrees(position.lng, position.lat) | Cesium.Cartographic.fromDegrees(position.lng, position.lat) | ||||
| ) | ) | ||||
| * @returns {*} | * @returns {*} | ||||
| * @private | * @private | ||||
| */ | */ | ||||
| _paserPositions(positions) { | |||||
| return positions.map(this._paserPosition.bind(this)) | |||||
| _parsePositions(positions) { | |||||
| return positions.map(this._parsePosition.bind(this)) | |||||
| } | } | ||||
| /** | /** | ||||
| Math.abs(this._mRect.north - this._mRect.south) / this._canvas.height | Math.abs(this._mRect.north - this._mRect.south) / this._canvas.height | ||||
| ) | ) | ||||
| } | } | ||||
| this._points = this._paserPositions(this._positions) | |||||
| this._points = this._parsePositions(this._positions) | |||||
| if (this._heat) { | if (this._heat) { | ||||
| this._heat.blur() | this._heat.blur() | ||||
| this._heat.addPoints(this._points) | this._heat.addPoints(this._points) | ||||
| ) | ) | ||||
| this._heat.addPoints(this._points) | this._heat.addPoints(this._points) | ||||
| } | } | ||||
| let point = this._paserPosition(position) | |||||
| let point = this._parsePosition(position) | |||||
| this._points.push(point) | this._points.push(point) | ||||
| if (this._heat) { | if (this._heat) { | ||||
| this._heat.addPoint(point.x, point.y, point.size, point.intensity) | this._heat.addPoint(point.x, point.y, point.size, point.intensity) |