<template> <div class="wrap"> <div id="map"></div> </div> </template> <script> export default { data() { window.viewer = null; return {}; }, mounted() { this.createballFn(); }, methods: { createballFn() { Cesium.Camera.DEFAULT_VIEW_RECTANGLE = Cesium.Rectangle.fromDegrees( 90, -20, 110, 90 ); Cesium.Ion.defaultAccessToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI1YzRhOGE5YS0yOWM3LTQ4NWYtOWMwYi0zNjU5OTJjZjA1ZjYiLCJpZCI6NTQxMzUsImlhdCI6MTYxOTU5Mzg3Mn0.gma-xUFLKsltb3ijWbpUh6E9ca1rGcg9Oh_hOUu2ZTc"; viewer = new Cesium.Viewer("map", { animation: true, shouldAnimate: true, baseLayerPicker: false, fullscreenButton: false, geocoder: false, homeButton: true, infoBox: false, sceneModePicker: false, selectionIndicator: false, timeline: true, navigationHelpButton: false, scene3DOnly: false, }); viewer._cesiumWidget._creditContainer.style.display = "none"; viewer.cesiumWidget.screenSpaceEventHandler.removeInputAction( Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK ); }, }, }; </script> <style scoped lang="scss"></style>
|