Such a scene is often encountered on the Openlayers map. After obtaining a certain data, the center point will be repositioned to a certain position. Here, setCenter([lon,lat]) can be used, and it can be displayed in the form of animation. In this actual combat, animations of translation, elastic translation, and flight are shown.
renderings
source code
/*
* @Author: 大剑师兰特(xiaozhuanlan),还是大剑师兰特(CSDN)
* @此源代码版权归大剑师兰特所有,可供学习或商业项目中借鉴,未经授权,不得重复地发表到博客、论坛,问答,git等公共空间或网站中。
* @Email: [email protected]
* @First published in CSDN
* @First published time: 2023-07-11
*/
<template>
<div class="container"