Skip to content

初始影像

框架支持多种动态水面效果

支持影像

INFO

支持直接加载和手动创建

代码实例

ts
let map: any
LarkExplorer.ready({
    baseUrl: './dist/resources/',
  }).then(initMap)

function initMap() {
  // 默认谷歌影像地图
  const baseImagery = LarkExplorer.BaseLayer.DefaultTdtImg

  // 默认全球地形
  const baseTerrain = LarkExplorer.BaseLayer.DefaultTerrain

  map = new LarkExplorer.Map('map', baseImagery, baseTerrain)
  const points = [
    [76.14218009789242, 42.47698508817907],
    [76.70454726525776, 42.598342385308676],
    [77.29119520576982, 42.70782258094974],
    [78.14187008253228, 42.75707076492938],
    [78.07411702478595, 42.55673693892645],
    [77.55974355740439, 42.19113866362949],
    [76.88938636618754, 42.22153022246854],
    [76.28469847787548, 42.342520039313875],
    [76.1348966035066, 42.42671561240631],
  ]
  const positions = LarkExplorer.Coordinate.PosFromDegreeArray(points)
  map.Layers.Add.addRiver(positions, 'river-id')
}
let river1: any
const create = () => {
  map.Layers.Creator.createRiver((res: any) => {
    console.log('创建成功', res)
    river1 = res
  })
}
const remove = () => {
  map.Layers.remove(river1)
}

运行效果 更多示例