Cesium离线GIS部署使用(无外网环境)

By default, Cesium uses several external data sources which require internet access at runtime, though none of these dependencies are required. This guide lists these external sources and how to configure Cesium to work in a fully offline (no internet access) environment.

Imagery

The default imagery provider in Cesium is Bing Maps. This provider loads data from dev.virtualearth.net as well as several other tile servers that are subdomains of virtualearth.net. To use another provider, pass it into the constructor for the Viewer widget.

If you have an imagery server on your local network (e.g. WMS, ArcGIS, Google Earth Enterprise), you can configure Cesium to use that. Otherwise, Cesium ships with a low-resolution set of images from Natural Earth II in Assets/Textures/NaturalEarthII.

By default, the BaseLayerPicker includes options for several sample online imagery and terrain sources. In an offline application, you should either disable that widget completely, by passing baseLayerPicker : false to the Viewer widget, or use the imageryProviderViewModels and terrainProviderViewModels options to configure the sources that will be available in your offline application.

Geocoder

The Geocoder widget, which allows flying to addresses and landmarks, uses the Bing Maps Locations API at dev.virtualearth.net. In your offline application, you should disable this functionality by passing geocoder : false to the Viewer constructor.

Example

This example shows how to configure Cesium to avoid use of online data sources.

var viewer = new Cesium.Viewer('cesiumContainer', {
  imageryProvider : Cesium.createTileMapServiceImageryProvider({
    url : Cesium.buildModuleUrl('Assets/Textures/NaturalEarthII')
  }),
  baseLayerPicker : false,
  geocoder : false
});

原文链接:https://github.com/AnalyticalGraphicsInc/cesium/wiki/Offline-Guide

 

 

 

  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值