PageSourceSearch

https://axy-cesium.netlify.app/assets/smoothFly-rm2_kIWa.js

js axy-cesium.netlify.app collected 2026-10-03 10:30:07 UTC 3,069 bytes, 1 lines download raw bytes

1/* empty css                */import{d as C,a as m,b as f,n as l,e as p,g as s,i as v,w as T,r as g,F as y,j as x,o as I,a1 as M,_ as h}from"./index-C7sxEexO.js";const w={class:"menubox"},b={id:"cesiumContainer",ref:"cesiumContainer"},k=C({__name:"smoothFly",setup(E){var t;const a=m("false"),i=m(!1),u=()=>{Cesium.Ion.defaultAccessToken="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIyMjBkODk3NS0xZmE4LTQ5MzgtYTAxZC1mZTZhZTVmMTY3ZjQiLCJpZCI6MTcwNzE3LCJpYXQiOjE2OTY4MTY5OTN9.YivsBCkT8fHJNB5lFMFo2bh7860luv368ALHw-_gCD0",t=new Cesium.Viewer("cesiumContainer",{infoBox:!1,selectionIndicator:!1,sceneModePicker:!1,animation:!1,baseLayerPicker:!1,geocoder:!1,homeButton:!1,timeline:!1,navigationHelpButton:!1,fullscreenButton:!1,terrain:Cesium.Terrain.fromWorldTerrain({requestWaterMask:!0,requestVertexNormals:!0})}),t.scene.screenSpaceCameraController.zoomEventTypes=[Cesium.CameraEventType.WHEEL,Cesium.CameraEventType.PINCH],t.scene.screenSpaceCameraController.tiltEventTypes=[Cesium.CameraEventType.PINCH,Cesium.CameraEventType.RIGHT_DRAG],t.cesiumWidget.creditContainer.setAttribute("style","display:none;"),t.scene.screenSpaceCameraController.enableRotate=!0,t.scene.screenSpaceCameraController.enableTilt=!0;let o=new Cesium.WebMapTileServiceImageryProvider({url:"https://t{s}.tianditu.gov.cn/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&tk=436ce7e50d27eede2f2929307e6b33c0",subdomains:["1","2","3","4","5","6","7"],layer:"tdt_imgLayer",style:"default",format:"image/jpeg",tileWidth:256,tileHeight:256,tileMatrixSetID:"GoogleMapsCompatible",maximumLevel:18});t.imageryLayers.addImageryProvider(o);var e=new Cesium.EventHelper;a.value==="true"?e.add(t.scene.globe.tileLoadProgressEvent,function(n){n==0&&(console.log("矢量切片加载完成时的回调"),i.value||(l(()=>{r()}),i.value=!0))}):(r(),i.value=!0)},r=()=>{t.camera.flyTo({destination:Cesium.Cartesian3.fromDegrees(105,35,1e5),orientation:{heading:Cesium.Math.toRadians(0),pitch:Cesium.Math.toRadians(-90),roll:0},duration:8})},d=o=>{M.confirm("切换后将重新加载地图查看效果,确定要切换吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{a.value=o?"true":"false",sessionStorage.setItem("smoothFly",o?"true":"false"),l(()=>{window.location.reload()})})};return f(()=>{a.value=sessionStorage.getItem("smoothFly")==="true"?"true":"false",console.log("smoothFly:",a.value,sessionStorage.getItem("smoothFly")),l(()=>{u()})}),(o,e)=>{const n=g("el-checkbox");return I(),p(y,null,[s("div",w,[v(n,{modelValue:a.value,"onUpdate:modelValue":e[0]||(e[0]=c=>a.value=c),onChange:d},{default:T(()=>[...e[1]||(e[1]=[x("丝滑加载",-1)])]),_:1},8,["modelValue"]),e[2]||(e[2]=s("div",null,"如果对比效果不明显",-1)),e[3]||(e[3]=s("div",null,"请清空浏览器缓存",-1)),e[4]||(e[4]=s("div",null,"或禁用图片缓存",-1))]),s("div",b,null,512)],64)}}}),S=h(k,[["__scopeId","data-v-916a5342"]]);export{S as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.