Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
map-demo
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2024-03-22 18:42:00 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
cbf6091a2f1367a6c1f22e76f648282386e7dfa3
cbf6091a
1 parent
736bd0cc
fix 地图设置调整
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
publish.sh
src/views/index.vue
publish.sh
View file @
cbf6091
...
...
@@ -37,5 +37,5 @@ git commit -m '前端地图更新'
git push
# 更新SSH服务器上文件
#
ssh -p 22 itomix@ipadbiz.cn 'cd /opt/space-dev/ && git pull origin develop'
ssh -p 22 itomix@ipadbiz.cn
'cd /opt/oa/ && git pull origin master'
ssh -p 22 itomix@ipadbiz.cn
'cd /opt/space-dev/ && git pull origin develop'
#
ssh -p 22 itomix@ipadbiz.cn 'cd /opt/oa/ && git pull origin master'
...
...
src/views/index.vue
View file @
cbf6091
<!--
* @Date: 2023-05-19 14:54:27
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-03-22 1
1:40:02
* @LastEditTime: 2024-03-22 1
6:38:53
* @FilePath: /map-demo/src/views/index.vue
* @Description: 公众地图主体页面
-->
...
...
@@ -242,6 +242,8 @@ export default {
open_current_location: true,
data_center: [], // 接口获取-地图中心点
data_zoom: '', // 接口获取-地图默认缩放
data_zooms: '', // 接口获取-地图默认缩放范围
data_rotation: 0, // 接口获取-地图旋转角度
}
},
async mounted() {
...
...
@@ -252,8 +254,10 @@ export default {
this.mapTiles = data.level; // 获取图层
this.navKey = data.list[0]['id']; // 默认选中 第一个 id
this.navList = data.list.filter(item => item.id === this.navKey)[0]['list']; // 返回默认选中项的实体信息
this.data_center = data.map.center.length ? data.map.center.map(item => Number(item)) : this.defaultCenter; // 地图中心点
this.data_zoom = data.map.zoom ? data.map.zoom : this.defaultZoom; // 地图默认缩放
this.data_center = data.map.center.map(item => Number(item)); // 地图中心点
this.data_zoom = data.map.zoom; // 地图默认缩放
this.data_rotation = data.map.rotation; // 地图旋转角度
this.data_zooms = data.map.zooms.map(item => Number(item)); // 地图默认缩放范围
// 初始化地图
this.initMap();
// this.setMapBoundary();
...
...
@@ -313,7 +317,7 @@ export default {
showIndoorMap: false,
defaultCursor: 'pointer', // 地图默认鼠标样式
showBuildingBlock: false, // 是否展示地图 3D 楼块
zooms:
[17, 20]
, // 地图显示的缩放级别范围, 默认为 [2, 20] ,取值范围 [2 ~ 30]
zooms:
this.data_zooms
, // 地图显示的缩放级别范围, 默认为 [2, 20] ,取值范围 [2 ~ 30]
showLabel: true, // 是否展示地图文字和 POI 信息
zoom: this.data_zoom, // 设置地图显示的缩放级别
pitch: 0, // 俯仰角度,默认 0,最大值根据地图当前 zoom 级别不断增大,2D地图下无效 。
...
...
@@ -333,7 +337,7 @@ export default {
// 加载景点图层
this.loadMaker(this.navKey);
//
this.map.setRotation(
6
, true);
this.map.setRotation(
this.data_rotation
, true);
},
setNavLayer({ id }, index) { // 选择地图图层显示
this.isActive = index;
...
...
Please
register
or
login
to post a comment