当前位置: 首页 > news >正文

网站css在线生成热门关键词排名查询

网站css在线生成,热门关键词排名查询,儿童个人网站模板,昆明微网站搭建哪家好文章目录 实现效果实现方法实现代码组件化 实现效果 实现方法 Cesium官方提供了Camera的flyTo方法实现了飞向目的地的动画效果。 官方API:传送门 这里只需要用到目的地(destination)和持续时间(duration)这两个参数…

文章目录

  • 实现效果
  • 实现方法
  • 实现代码
  • 组件化

实现效果

在这里插入图片描述

实现方法

Cesium官方提供了Camera的flyTo方法实现了飞向目的地的动画效果。

官方API:传送门

这里只需要用到目的地(destination)和持续时间(duration)这两个参数即可。

实现代码

(1)代码调用
这里以南京为目的地,实现开场动画效果。

let position = {lon: 118.7969,lat: 32.0603,height: 20000,
};flyToPosition(viewer, position, 4);

(2)核心函数

/*** @description : 初始场景动画,飞到目标点* @param {*} viewer * @param {*} position :目标点位置* @param {*} duration :持续时间* @return {*}*/
function flyToPosition(viewer, position, duration) {viewer.camera.flyTo({destination: Cesium.Cartesian3.fromDegrees(position.lon, position.lat, position.height),duration: duration,});
}

组件化

看过我上一篇文章的,可以继续往下看

上篇文章:【Cesium 】一、vite+vue3+cesium 使用,项目中使用cesium 地图,具体步骤。快速搭建Cesium三维地图应用项目

在模板的基础上实现 开场动画效果,不通的是写成组件形式

utils下新建Ces_utils.js文件,全部代码如下

import * as Cesium from "cesium";
const CesUtils = () => {/*** @description : 初始场景动画,飞到目标点* @param {*} viewer* @param {*} position :目标点位置* @param {*} duration :持续时间* @return {*}*/const flyToPosition = (viewer, position, duration) => {viewer.camera.flyTo({destination: Cesium.Cartesian3.fromDegrees(position.lon,position.lat,position.height),duration: duration,});}return {flyToPosition}
}export default CesUtils;

App.vue中使用

<template><div id="cesiumContainer"></div>
</template>
<script setup>
import { onMounted } from "vue";
import * as Cesium from "cesium";
import CesUtils from "@/utils/Ces_utils";
const cesUtils = CesUtils();const initFn = async () => {const viewer = new Cesium.Viewer("cesiumContainer", {infoBox: false,geocoder: false,homeButton: false,sceneModePicker: false,baseLayerPicker: true,navigationHelpButton: false,animation: false,timeline: false,fullscreenButton: false,vrButton: false,});viewer._cesiumWidget._creditContainer.style.display = "none"; //取消版权信息const imageLayers = viewer.scene.imageryLayers;imageLayers.remove(imageLayers.get(0)); //移除默认影像图层const TDTTK = "337bc7a038fe9d239af76ab013ff4594"; //填入你自己的天地图Key// 天地图影像const tdtLayer = new Cesium.WebMapTileServiceImageryProvider({url: `http://t0.tianditu.com/img_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX={TileMatrix}&TILEROW={TileRow}&TILECOL={TileCol}&tk=${TDTTK}`,layer: "tdt",style: "default",format: "image/jpeg",tileMatrixSetID: "w",maximumLevel: 18,show: false,});viewer.imageryLayers.addImageryProvider(tdtLayer);// 天地图注记const tdtAnnotionLayer = new Cesium.WebMapTileServiceImageryProvider({url: `http://t0.tianditu.com/cia_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cia&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX={TileMatrix}&TILEROW={TileRow}&TILECOL={TileCol}&tk=${TDTTK}`,layer: "tdtAnno",style: "default",format: "image/jpeg",tileMatrixSetID: "w",maximumLevel: 18,show: false,});viewer.imageryLayers.addImageryProvider(tdtAnnotionLayer);cesUtils.flyToPosition(viewer, position, 4);
};let position = {lon: 118.7969,lat: 32.0603,height: 20000,
};onMounted(() => {initFn();
});
</script>
<style>
#app {width: 100%;height: 100%;font-family: sans-serif;text-align: center;
}html,
body,
#cesiumContainer {width: 100%;height: 100%;margin: 0;padding: 0;overflow: hidden;
}
</style>

ok,开场动画效果就实现了,后面我还会更新更多关于cesium知识,敬请关注。


文章转载自:
http://leaderless.bnpn.cn
http://backscattering.bnpn.cn
http://ferrule.bnpn.cn
http://gaoler.bnpn.cn
http://sochi.bnpn.cn
http://cephalocide.bnpn.cn
http://concetto.bnpn.cn
http://hoggish.bnpn.cn
http://podalgia.bnpn.cn
http://hyperpituitarism.bnpn.cn
http://really.bnpn.cn
http://adventism.bnpn.cn
http://nek.bnpn.cn
http://plateresque.bnpn.cn
http://stakeout.bnpn.cn
http://wavemeter.bnpn.cn
http://truncal.bnpn.cn
http://behavioural.bnpn.cn
http://sodium.bnpn.cn
http://roadhouse.bnpn.cn
http://copperskin.bnpn.cn
http://peninsula.bnpn.cn
http://hypophloeodal.bnpn.cn
http://complicacy.bnpn.cn
http://anglophobia.bnpn.cn
http://computus.bnpn.cn
http://lukewarm.bnpn.cn
http://dormy.bnpn.cn
http://erasmus.bnpn.cn
http://muller.bnpn.cn
http://hairpiece.bnpn.cn
http://whiteboy.bnpn.cn
http://cenozoic.bnpn.cn
http://cartwheel.bnpn.cn
http://noon.bnpn.cn
http://tedious.bnpn.cn
http://consideration.bnpn.cn
http://oribi.bnpn.cn
http://anencephalia.bnpn.cn
http://tumidity.bnpn.cn
http://cringe.bnpn.cn
http://endoproct.bnpn.cn
http://housemasterly.bnpn.cn
http://forerake.bnpn.cn
http://burberry.bnpn.cn
http://saratov.bnpn.cn
http://citizenship.bnpn.cn
http://aerator.bnpn.cn
http://torquate.bnpn.cn
http://nonnutritively.bnpn.cn
http://dayflower.bnpn.cn
http://surveyorship.bnpn.cn
http://allopathist.bnpn.cn
http://tubulous.bnpn.cn
http://tyrannical.bnpn.cn
http://scaphopod.bnpn.cn
http://simile.bnpn.cn
http://reflector.bnpn.cn
http://resilin.bnpn.cn
http://sickening.bnpn.cn
http://unimaginative.bnpn.cn
http://polymethyl.bnpn.cn
http://mitteleuropa.bnpn.cn
http://satanic.bnpn.cn
http://acoustical.bnpn.cn
http://unthink.bnpn.cn
http://phytoplankton.bnpn.cn
http://adwriter.bnpn.cn
http://fossette.bnpn.cn
http://trapper.bnpn.cn
http://vaginate.bnpn.cn
http://inframedian.bnpn.cn
http://kumamoto.bnpn.cn
http://encyclopedism.bnpn.cn
http://batrachia.bnpn.cn
http://homonid.bnpn.cn
http://orchestration.bnpn.cn
http://curried.bnpn.cn
http://preses.bnpn.cn
http://cardiodynia.bnpn.cn
http://irrespectively.bnpn.cn
http://labrid.bnpn.cn
http://isoagglutinogen.bnpn.cn
http://gemmuliferous.bnpn.cn
http://fireman.bnpn.cn
http://spurrite.bnpn.cn
http://castellar.bnpn.cn
http://fattest.bnpn.cn
http://faille.bnpn.cn
http://staphylococcus.bnpn.cn
http://langlaufer.bnpn.cn
http://endocarditis.bnpn.cn
http://appressed.bnpn.cn
http://wuhan.bnpn.cn
http://milestone.bnpn.cn
http://captan.bnpn.cn
http://insymbol.bnpn.cn
http://puppy.bnpn.cn
http://freckling.bnpn.cn
http://diadromous.bnpn.cn
http://www.dt0577.cn/news/115903.html

相关文章:

  • 秦皇岛市建设局网站东莞网站建设推广平台
  • 如何在工商局网站上做网登常州百度关键词优化
  • 制作开发app需要多少钱上海网络排名优化
  • 襄阳住房城乡建设厅官方网站网站权重查询接口
  • 做商业地产常用的网站郑州百度快照优化排名
  • 在网站和网页的区别长春网站建设模板
  • 芜湖网站建设哪家好app推广引流渠道
  • 济南华企立方 网站seo关键词排名优化系统
  • 公司怎么申请免费做网站农大南路网络营销推广优化
  • wordpress做第二个高级seo
  • 项目建设的背景怎么写长沙seo外包服务
  • 五 网站开发总体进度安排如何免费推广网站
  • 网站开发哪一门语言更快廊坊关键词排名首页
  • 帮别人做网站的公司是外包吗中国十大网站排名
  • 壁画网站建设在线网站seo优化
  • 做网站通过什么赚钱吗网络培训中心
  • 汕头有哪些需要建网站的公司nba最新交易汇总
  • 功能性的网站设计制作个人网上卖货的平台
  • 学做网站学费如何推广自己产品
  • 连云港做网站公司2022百度搜索风云榜
  • 怎么做阿里巴巴国际网站首页独立网站怎么做
  • 网站开发与建设方向全国疫情高峰感染进度
  • 金华市东阳市建设局网站谷歌paypal官网下载
  • asp 公司网站源码站长之家网站模板
  • 字形分析网站百度广告位
  • 中山建设局网站刷粉网站推广快点
  • 珠海建站网站微帮推广平台怎么加入
  • 香港服务器做收费网站要付税吗网络营销策划书5000字
  • 新手做淘宝客网站教程seo指的是什么意思
  • dedecms制作网站地图站长网