Bläddra i källkod

修改显示和影藏bug

tags/1.0.0
Caven 5 år sedan
förälder
incheckning
d4eee5dde9

+ 13
- 1
src/core/layer/DC.GeoJsonLayer.js Visa fil

* @Author: Caven * @Author: Caven
* @Date: 2020-01-13 10:13:53 * @Date: 2020-01-13 10:13:53
* @Last Modified by: Caven * @Last Modified by: Caven
* @Last Modified time: 2020-02-29 18:08:14
* @Last Modified time: 2020-03-09 21:26:57
*/ */
import Cesium from '@/namespace' import Cesium from '@/namespace'
import Layer from './Layer' import Layer from './Layer'
this.type = DC.LayerType.GEOJSON this.type = DC.LayerType.GEOJSON
} }


set show(show) {
this._show = show
this._delegate &&
this._delegate.then(dataSource => {
dataSource.show = this._show
})
}

get show() {
return this._show
}

_createBillboard(entity) { _createBillboard(entity) {
if (entity.position && entity.billboard) { if (entity.position && entity.billboard) {
return DC.Billboard.fromEntity(entity) return DC.Billboard.fromEntity(entity)

+ 1
- 1
src/core/layer/DC.TilesetLayer.js Visa fil

* @Author: Caven * @Author: Caven
* @Date: 2020-01-09 09:16:27 * @Date: 2020-01-09 09:16:27
* @Last Modified by: Caven * @Last Modified by: Caven
* @Last Modified time: 2020-02-29 18:09:12
* @Last Modified time: 2020-03-09 21:11:15
*/ */


import Cesium from '@/namespace' import Cesium from '@/namespace'

+ 2
- 2
src/core/layer/DC.VectorLayer.js Visa fil

* @Author: Caven * @Author: Caven
* @Date: 2020-01-02 16:42:03 * @Date: 2020-01-02 16:42:03
* @Last Modified by: Caven * @Last Modified by: Caven
* @Last Modified time: 2020-02-29 18:09:45
* @Last Modified time: 2020-03-09 21:11:05
*/ */


import Cesium from '@/namespace' import Cesium from '@/namespace'


clear() { clear() {
this._cache = {} this._cache = {}
this._delegate.entities.removeAll()
this._delegate.entities && this._delegate.entities.removeAll()
this._state = DC.LayerState.CLEARED this._state = DC.LayerState.CLEARED
return this return this
} }

+ 2
- 2
src/core/layer/Layer.js Visa fil

* @Author: Caven * @Author: Caven
* @Date: 2020-01-03 09:38:21 * @Date: 2020-01-03 09:38:21
* @Last Modified by: Caven * @Last Modified by: Caven
* @Last Modified time: 2020-03-06 17:11:02
* @Last Modified time: 2020-03-09 21:13:02
*/ */
import Cesium from '@/namespace' import Cesium from '@/namespace'
import { LayerEvent } from '@/core/event' import { LayerEvent } from '@/core/event'
this._delegate.removeAll() this._delegate.removeAll()
this._viewer.delegate.scene.primitives.remove(this._delegate) this._viewer.delegate.scene.primitives.remove(this._delegate)
} else { } else {
this._delegate.entities.removeAll()
this._delegate.entities && this._delegate.entities.removeAll()
this._viewer.delegate.dataSources.remove(this._delegate) this._viewer.delegate.dataSources.remove(this._delegate)
} }
this._state = DC.LayerState.REMOVED this._state = DC.LayerState.REMOVED

+ 5
- 1
src/core/viewer/DC.Viewer.js Visa fil

* @Author: Caven * @Author: Caven
* @Date: 2019-12-27 17:13:24 * @Date: 2019-12-27 17:13:24
* @Last Modified by: Caven * @Last Modified by: Caven
* @Last Modified time: 2020-03-06 00:10:44
* @Last Modified time: 2020-03-07 22:25:38
*/ */


import Cesium from '@/namespace' import Cesium from '@/namespace'
return this._comps.mapSplit return this._comps.mapSplit
} }


get mapSwitch() {
return this._comps.mapSwitch
}

get locationBar() { get locationBar() {
return this._comps.locationBar return this._comps.locationBar
} }

+ 2
- 4
src/core/widget/LocationBar.js Visa fil

* @Author: Caven * @Author: Caven
* @Date: 2020-03-04 18:02:32 * @Date: 2020-03-04 18:02:32
* @Last Modified by: Caven * @Last Modified by: Caven
* @Last Modified time: 2020-03-05 23:25:02
* @Last Modified time: 2020-03-09 20:59:35
*/ */
import Cesium from '@/namespace'
import Widget from './Widget' import Widget from './Widget'


class LocationBar extends Widget { class LocationBar extends Widget {


_moveHandler(movement) { _moveHandler(movement) {
if (this._enable) { if (this._enable) {
console.log(movement)
} }
} }


_cameraHandler(e) { _cameraHandler(e) {
if (this._enable) { if (this._enable) {
console.log(movement)
} }
} }



+ 7
- 5
src/core/widget/MapSwitch.js Visa fil

* @Author: Caven * @Author: Caven
* @Date: 2020-02-11 18:34:46 * @Date: 2020-02-11 18:34:46
* @Last Modified by: Caven * @Last Modified by: Caven
* @Last Modified time: 2020-03-05 23:41:38
* @Last Modified time: 2020-03-07 21:15:41
*/ */
import Widget from './Widget' import Widget from './Widget'


} }


addMap(map = {}) { addMap(map = {}) {
this._cache.push(map)
this._addItem(map)
if (this._cache.length > 1) {
this._wapper.style.visibility = 'visible'
if (this._enable) {
this._cache.push(map)
this._addItem(map)
if (this._cache.length > 1) {
this._wapper.style.visibility = 'visible'
}
} }
} }
} }

+ 13
- 1
src/plugins/layer/DC.CzmlLayer.js Visa fil

* @Author: Caven * @Author: Caven
* @Date: 2020-01-19 13:38:48 * @Date: 2020-01-19 13:38:48
* @Last Modified by: Caven * @Last Modified by: Caven
* @Last Modified time: 2020-02-29 18:11:57
* @Last Modified time: 2020-03-09 21:28:16
*/ */


import Cesium from '@/namespace' import Cesium from '@/namespace'
this.type = DC.LayerType.CZML this.type = DC.LayerType.CZML
} }


set show(show) {
this._show = show
this._delegate &&
this._delegate.then(dataSource => {
dataSource.show = this._show
})
}

get show() {
return this._show
}

eachOverlay(method, context) { eachOverlay(method, context) {
if (this._delegate) { if (this._delegate) {
this._delegate.then(dataSource => { this._delegate.then(dataSource => {

+ 1
- 9
src/plugins/layer/DC.HeatmapLayer.js Visa fil

* @Author: Caven * @Author: Caven
* @Date: 2020-02-27 00:35:35 * @Date: 2020-02-27 00:35:35
* @Last Modified by: Caven * @Last Modified by: Caven
* @Last Modified time: 2020-02-29 18:12:36
* @Last Modified time: 2020-03-09 21:28:43
*/ */
import Cesium from '@/namespace' import Cesium from '@/namespace'
import Layer from '@/core/layer/Layer' import Layer from '@/core/layer/Layer'
this.type = DC.LayerType.HEAT this.type = DC.LayerType.HEAT
} }


set show(show) {
this._show = show
}

get show() {
return this._show
}

/** /**
* *
* @param {*} position * @param {*} position

+ 13
- 1
src/plugins/layer/DC.KmlLayer.js Visa fil

* @Author: Caven * @Author: Caven
* @Date: 2020-01-19 11:03:17 * @Date: 2020-01-19 11:03:17
* @Last Modified by: Caven * @Last Modified by: Caven
* @Last Modified time: 2020-02-29 18:13:10
* @Last Modified time: 2020-03-09 21:28:59
*/ */


import Cesium from '@/namespace' import Cesium from '@/namespace'
this.type = DC.LayerType.KML this.type = DC.LayerType.KML
} }


set show(show) {
this._show = show
this._delegate &&
this._delegate.then(dataSource => {
dataSource.show = this._show
})
}

get show() {
return this._show
}

eachOverlay(method, context) { eachOverlay(method, context) {
if (this._delegate) { if (this._delegate) {
this._delegate.then(dataSource => { this._delegate.then(dataSource => {

+ 1
- 1
webpack.conf.js Visa fil

* @Author: Caven * @Author: Caven
* @Date: 2020-01-18 18:22:23 * @Date: 2020-01-18 18:22:23
* @Last Modified by: Caven * @Last Modified by: Caven
* @Last Modified time: 2020-02-24 13:30:25
* @Last Modified time: 2020-03-09 21:15:26
*/ */


const path = require('path') const path = require('path')

+ 1
- 1
webpack.plugins.conf.js Visa fil

* @Author: Caven * @Author: Caven
* @Date: 2020-01-18 18:22:23 * @Date: 2020-01-18 18:22:23
* @Last Modified by: Caven * @Last Modified by: Caven
* @Last Modified time: 2020-02-27 12:48:24
* @Last Modified time: 2020-03-07 21:34:45
*/ */


const path = require('path') const path = require('path')

Laddar…
Avbryt
Spara