Sfoglia il codice sorgente

add heightoffset option

tags/2.13.0
Caven Chen 3 anni fa
parent
commit
46b4493622
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2
    1
      libs/s3m/S3MTiles/S3MTilesLayer.js

+ 2
- 1
libs/s3m/S3MTiles/S3MTilesLayer.js Vedi File

@@ -13,6 +13,7 @@ function S3MTilesLayer(options) {
this.id = Cesium.createGuid()
this.name = options.name
this.context = options.context
this.heightOffset = options.heightOffset || 0
this._url = undefined
this._basePath = undefined
this._baseResource = undefined
@@ -166,7 +167,7 @@ S3MTilesLayer.prototype.loadConfig = function(url) {
let lon = config.position.x
let lat = config.position.y
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._position
)

Loading…
Annulla
Salva