Quellcode durchsuchen

add heightoffset option

tags/2.13.0
Caven Chen vor 3 Jahren
Ursprung
Commit
46b4493622
1 geänderte Dateien mit 2 neuen und 1 gelöschten Zeilen
  1. 2
    1
      libs/s3m/S3MTiles/S3MTilesLayer.js

+ 2
- 1
libs/s3m/S3MTiles/S3MTilesLayer.js Datei anzeigen

this.id = Cesium.createGuid() this.id = Cesium.createGuid()
this.name = options.name this.name = options.name
this.context = options.context this.context = options.context
this.heightOffset = options.heightOffset || 0
this._url = undefined this._url = undefined
this._basePath = undefined this._basePath = undefined
this._baseResource = undefined this._baseResource = undefined
let lon = config.position.x let lon = config.position.x
let lat = config.position.y let lat = config.position.y
let height = config.position.z let height = config.position.z
that._position = Cesium.Cartesian3.fromDegrees(lon, lat, height)
that._position = Cesium.Cartesian3.fromDegrees(lon, lat, height + this.heightOffset)
that.modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame( that.modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(
that._position that._position
) )

Laden…
Abbrechen
Speichern