Skip to content

KBE3D / KBCore / Cesium / buildModuleUrl

函数: buildModuleUrl()

buildModuleUrl(relativeUrl: string): string

Given a relative URL under the Cesium base URL, returns an absolute URL.

参数

relativeUrl

string

The relative path.

返回

string

The absolutely URL representation of the provided path.

示例

ts
const viewer = new Cesium.Viewer("cesiumContainer", {
  baseLayer: Cesium.ImageryLayer.fromProviderAsync(
    Cesium.TileMapServiceImageryProvider.fromUrl(
      Cesium.buildModuleUrl("Assets/Textures/NaturalEarthII"),
    )),
  baseLayerPicker: false,
});

KBE3D @3.0.0 Copyright © 2024-present KBE3D