| | |
| | | <template> |
| | | <div class="bottom" id="bottom" :style="customStyle" v-if="state1.show"> |
| | | <!-- <div class="mapTool"> |
| | | <div class="tool-rotate" @click="PointingNorth" title="指北"> |
| | | <div class="mapTool"> |
| | | <div class="tool-rotate" @click="flyToCurrentPosition" title="定位"> |
| | | <img src="@/assets/img/collection/compass.png" /> |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | <div class="mapTool"> |
| | | <div class="tool-rotate" @click="flyBack" title="复位"> |
| | | <img src="@/assets/img/collection/recover.png" /> |
| | |
| | | </template> |
| | | |
| | | <style scoped> |
| | | |
| | | .mapTool { |
| | | width: 0.42rem; |
| | | /* border-radius: 10px; */ |
| | |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | .mapTool2 .tool-rotate{ |
| | | .mapTool2 .tool-rotate { |
| | | height: 0.33rem; |
| | | line-height: 0.33rem; |
| | | } |
| | |
| | | }, |
| | | }; |
| | | }, |
| | | mounted() { }, |
| | | mounted() {}, |
| | | watch: { |
| | | "state.show": { |
| | | handler(newVal) { |
| | |
| | | duration: 1000, // 缩放持续时间,默认不需要设置 |
| | | }); |
| | | }, |
| | | PointingNorth() { |
| | | alert("指北针开发中"); |
| | | // console.log("指北针开发中") |
| | | flyToCurrentPosition() { |
| | | window.mapapi.getView().animate({ |
| | | // 只设置需要的属性即可 |
| | | center: window.personalPoi, // 中心点 |
| | | zoom: 17, // 缩放级别 |
| | | rotation: undefined, // 缩放完成view视图旋转弧度 |
| | | duration: 1500, // 缩放持续时间,默认不需要设置 |
| | | }); |
| | | }, |
| | | }, |
| | | }; |