Viccy
Viccy
  • 发布:2018-07-16 16:08
  • 更新:2022-05-30 19:16
  • 阅读:1968

cesium 在ios上无法添加实体安卓上可以

分类:MUI
iOS
var viewer = new Cesium.Viewer("cesiumContainer", {  
        crossorigin: "anonymous",  
        animation: false, //是否显示动画控件  
        baseLayerPicker: false, //是否显示图层选择控件          
        geocoder: false,  
        timeline: false, //是否显示时间线控件  
        sceneModePicker: true, //是否显示投影方式控件2,3D切换控件  
        navigationHelpButton: false, //是否显示帮助信息控件  
        infoBox: false, //是否显示点击要素之后显示的信息  
        fullscreenButton: false,  
        sceneMode: Cesium.SceneMode.SCENE2D, //默认的显示3D,还是3D  
        imageryProvider: new Cesium.WebMapTileServiceImageryProvider({  
            url: "http://t0.tianditu.com/img_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=img&tileMatrixSet=w&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default&format=tiles",  
            layer: "tdtAnnoLayer",  
            style: "default",  
            format: "image/jpeg",  
            tileMatrixSetID: "GoogleMapsCompatible",  
            show: false,  
            maximumLevel: 16  
        })  
    });  

    viewer.imageryLayers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider({  
        url: "http://t0.tianditu.com/cia_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=cia&tileMatrixSet=w&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default.jpg",  
        layer: "tdtAnnoLayer", //全球影像中文注记服务  
        style: "default",  
        format: "image/jpeg",  
        tileMatrixSetID: "GoogleMapsCompatible",  
        show: false  
    }));  
    viewer._cesiumWidget._creditContainer.style.display = "none";  

    var wyoming = viewer.entities.add({ //添加一个实体,仅需要传递一个简单JSON对象,返回值是一个Entity对象  
        name: 'Wyoming',  
        polygon: {  
            hierarchy: Cesium.Cartesian3.fromDegreesArray([ //一组地理坐标  
                -109.080842, 45.002073, -105.91517, 45.002073, -104.058488, 44.996596, -104.053011, 43.002989, -104.053011, 41.003906, -105.728954, 40.998429, -107.919731, 41.003906, -109.04798, 40.998429, -111.047063, 40.998429, -111.047063, 42.000709, -111.047063, 44.476286, -111.05254, 45.002073  
            ]),  
            material: Cesium.Color.RED.withAlpha(0.5), //材质  
            outline: true, //是否显示轮廓  
            outlineColor: Cesium.Color.BLACK //轮廓的颜色  
        }  
    });  
    viewer.zoomTo(wyoming); //缩放、平移视图使实体可见  
    var redPolygon = viewer.entities.add({  
        name: '贴着地表的多边形',  
        polygon: {  
            hierarchy: Cesium.Cartesian3.fromDegreesArray([-115.0, 37.0, -115.0, 32.0, -107.0, 33.0, -102.0, 31.0, -102.0, 35.0]),  
            material: Cesium.Color.RED  
        }  
    });
2018-07-16 16:08 负责人:无 分享
已邀请:
7***@qq.com

7***@qq.com

能否请教下怎么在uni-app上集成cesium

8***@qq.com

8***@qq.com - qqjuanqq

uni-app中打包出现过白屏吗?

  • 1***@qq.com

    我也是cesium打包之后出现白屏,请问你现在解决了吗?

    2022-09-21 17:51

别讲故事了

别讲故事了 - 金融 IT 男

老哥请教下 cesium是怎么引入的 在main.js中引入总是报错无法加载模块

该问题目前已经被锁定, 无法添加新回复