首页 > 其他 > 详细

L1 kml加载及设置

时间:2019-10-27 10:03:55      阅读:133      评论:0      收藏:0      [点我收藏+]

本段位加载kml,生成entity数据形式,并通过material属性来实现想要的线性。

一、加载kml的端口

Cesium.KmlDatasource.load();viewer.dataSources.add()

data Resource | String | Document | Blob A url, parsed KML document, or Blob containing binary KMZ data or a parsed KML document.
options Object An object with the following properties:
NameTypeDefaultDescription
camera Camera   The camera that is used for viewRefreshModes and sending camera properties to network links.
canvas Canvas   The canvas that is used for sending viewer properties to network links.
sourceUri String   optional Overrides the url to use for resolving relative links and other KML network features.
clampToGround Boolean false optional true if we want the geometry features (Polygons, LineStrings and LinearRings) clamped to the ground.
ellipsoid Ellipsoid Ellipsoid.WGS84 optional The global ellipsoid used for geographical calculations.

 var viewer = new Cesium.Viewer(‘cesiumContainer‘);

viewer.dataSources.add(Cesium.KmlDataSource.load("地址",
     {
          camera: viewer.scene.camera,
          canvas: viewer.scene.canvas,
     clampToGround:true//设置贴地 }) );

二、

L1 kml加载及设置

原文:https://www.cnblogs.com/xiaoguniang0204/p/11746579.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!