hookehuyr

导航样式调整

...@@ -91,7 +91,7 @@ var touristSpots = [{ ...@@ -91,7 +91,7 @@ var touristSpots = [{
91 var spotInfo = [ 91 var spotInfo = [
92 { 92 {
93 name: '三宝楼', 93 name: '三宝楼',
94 - position: [120.587519, 31.315924], 94 + position: [120.587436, 31.316177],
95 icon: 'https://cdn.ipadbiz.cn/xys/map/%E6%AE%BF%E5%A0%82@2x.png', 95 icon: 'https://cdn.ipadbiz.cn/xys/map/%E6%AE%BF%E5%A0%82@2x.png',
96 }, 96 },
97 { 97 {
...@@ -101,7 +101,7 @@ var spotInfo = [ ...@@ -101,7 +101,7 @@ var spotInfo = [
101 }, 101 },
102 { 102 {
103 name: '罗汉堂', 103 name: '罗汉堂',
104 - position: [120.58764, 31.315011], 104 + position: [120.587581, 31.31505],
105 icon: 'https://cdn.ipadbiz.cn/xys/map/%E6%AE%BF%E5%A0%82@2x.png', 105 icon: 'https://cdn.ipadbiz.cn/xys/map/%E6%AE%BF%E5%A0%82@2x.png',
106 note: `与观音殿遥相呼应的是罗汉堂,位于大雄宝殿西侧。西园寺罗汉堂为中国四大古罗汉堂之一。 106 note: `与观音殿遥相呼应的是罗汉堂,位于大雄宝殿西侧。西园寺罗汉堂为中国四大古罗汉堂之一。
107 107
...@@ -116,7 +116,7 @@ var spotInfo = [ ...@@ -116,7 +116,7 @@ var spotInfo = [
116 }, 116 },
117 { 117 {
118 name: '大雄宝殿', 118 name: '大雄宝殿',
119 - position: [120.587249, 31.314722], 119 + position: [120.587116, 31.314809],
120 icon: 'https://cdn.ipadbiz.cn/xys/map/%E6%AE%BF%E5%A0%82@2x.png', 120 icon: 'https://cdn.ipadbiz.cn/xys/map/%E6%AE%BF%E5%A0%82@2x.png',
121 note: `大雄宝殿是寺院的中心建筑,兴建于清末民初时期。重檐歇山,面阔七楹,飞檐翘角,气势雄伟,风格挺秀。梁枋均施苏式彩绘,典雅富丽,绚丽夺目。 121 note: `大雄宝殿是寺院的中心建筑,兴建于清末民初时期。重檐歇山,面阔七楹,飞檐翘角,气势雄伟,风格挺秀。梁枋均施苏式彩绘,典雅富丽,绚丽夺目。
122 122
...@@ -147,12 +147,12 @@ var toiletInfo = [ ...@@ -147,12 +147,12 @@ var toiletInfo = [
147 var activityInfo = [ 147 var activityInfo = [
148 { 148 {
149 name: '西花园湖心亭', 149 name: '西花园湖心亭',
150 - position: [120.586253, 31.315273], 150 + position: [120.586478, 31.315098],
151 icon: 'https://cdn.ipadbiz.cn/xys/map/%E8%8A%B1%E5%9B%AD@2x.png', 151 icon: 'https://cdn.ipadbiz.cn/xys/map/%E8%8A%B1%E5%9B%AD@2x.png',
152 }, 152 },
153 { 153 {
154 name: '四百岁神龟', 154 name: '四百岁神龟',
155 - position: [120.585948, 31.315095], 155 + position: [120.585947, 31.315011],
156 icon: 'https://cdn.ipadbiz.cn/xys/map/%E8%8A%B1%E5%9B%AD@2x.png', 156 icon: 'https://cdn.ipadbiz.cn/xys/map/%E8%8A%B1%E5%9B%AD@2x.png',
157 }, 157 },
158 ]; 158 ];
......
1 <!-- 1 <!--
2 * @Date: 2023-05-19 14:54:27 2 * @Date: 2023-05-19 14:54:27
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2023-06-02 10:57:57 4 + * @LastEditTime: 2023-06-02 16:03:29
5 * @FilePath: /map-demo/src/views/index.vue 5 * @FilePath: /map-demo/src/views/index.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
...@@ -19,39 +19,39 @@ ...@@ -19,39 +19,39 @@
19 <div style="width: 4rem;flex-shrink: 0;"></div> 19 <div style="width: 4rem;flex-shrink: 0;"></div>
20 <div style="position: fixed; right: 0; background-color: white; height: 4.5rem; width: 4rem;"> 20 <div style="position: fixed; right: 0; background-color: white; height: 4.5rem; width: 4rem;">
21 <div style="padding-top: 40%;"> 21 <div style="padding-top: 40%;">
22 - <van-icon v-if="!show_nav_popup" name="arrow-down" @click="handleNavPopup" size="1.15rem" /> 22 + <van-icon v-if="!show_nav_popup" name="arrow-up" @click="handleNavPopup" size="1.15rem" />
23 - <van-icon v-else name="arrow-up" @click="handleNavPopup" size="1.15rem" /> 23 + <van-icon v-else name="arrow-down" @click="handleNavPopup" size="1.15rem" />
24 </div> 24 </div>
25 </div> 25 </div>
26 </div> 26 </div>
27 27
28 - <van-popup v-model:show="show_nav_popup" position="top" duration="0" :overlay="false" 28 + <van-popup v-model:show="show_nav_popup" position="bottom" duration="0" :overlay="false"
29 - :style="{ padding: '1rem', top: '4.5rem' }"> 29 + :style="{ padding: '1rem', bottom: '4.5rem' }">
30 <div style="text-align: left;"> 30 <div style="text-align: left;">
31 - <div @click="positionMarker" style="margin-bottom: 1rem; font-size: 1.15rem;"><van-icon name="fire-o" color="red" />&nbsp;&nbsp;三宝楼</div> 31 + <div @click="positionMarker()" style="margin-bottom: 1rem; font-size: 1.15rem;"><van-icon name="fire-o" color="red" />&nbsp;&nbsp;三宝楼</div>
32 <div style="margin-bottom: 1rem; font-size: 1.15rem;"><van-icon name="fire-o" color="red" />&nbsp;&nbsp;法云堂</div> 32 <div style="margin-bottom: 1rem; font-size: 1.15rem;"><van-icon name="fire-o" color="red" />&nbsp;&nbsp;法云堂</div>
33 <div style="margin-bottom: 1rem; font-size: 1.15rem;"><van-icon name="fire-o" color="red" />&nbsp;&nbsp;罗汉堂</div> 33 <div style="margin-bottom: 1rem; font-size: 1.15rem;"><van-icon name="fire-o" color="red" />&nbsp;&nbsp;罗汉堂</div>
34 <div style="margin-bottom: 1rem; font-size: 1.15rem;"><van-icon name="fire-o" color="red" />&nbsp;&nbsp;大雄宝殿</div> 34 <div style="margin-bottom: 1rem; font-size: 1.15rem;"><van-icon name="fire-o" color="red" />&nbsp;&nbsp;大雄宝殿</div>
35 </div> 35 </div>
36 </van-popup> 36 </van-popup>
37 </div> 37 </div>
38 - <div class="safe-route-wrapper"> 38 + <!-- <div class="safe-route-wrapper">
39 <span v-if="open_safe_route" @click="handleSafeRoute(true)">打开安全路线</span> 39 <span v-if="open_safe_route" @click="handleSafeRoute(true)">打开安全路线</span>
40 <span v-else @click="handleSafeRoute(false)">关闭安全路线</span> 40 <span v-else @click="handleSafeRoute(false)">关闭安全路线</span>
41 - </div> 41 + </div> -->
42 - <div class="tool-bar-wrapper"> 42 + <!-- <div class="tool-bar-wrapper">
43 <div style="display: flex; flex-direction: column;align-items: center;justify-content: center;"> 43 <div style="display: flex; flex-direction: column;align-items: center;justify-content: center;">
44 <van-icon name="plus" style="margin-bottom: 1rem;" @click="setZoom('plus')" /> 44 <van-icon name="plus" style="margin-bottom: 1rem;" @click="setZoom('plus')" />
45 <van-icon name="minus" style="margin-bottom: 1rem;" @click="setZoom('minus')" /> 45 <van-icon name="minus" style="margin-bottom: 1rem;" @click="setZoom('minus')" />
46 <van-icon name="aim" @click="setLocation" /> 46 <van-icon name="aim" @click="setLocation" />
47 </div> 47 </div>
48 - </div> 48 + </div> -->
49 <div class="operate-bar-wrapper"> 49 <div class="operate-bar-wrapper">
50 <div class="box-wrapper"> 50 <div class="box-wrapper">
51 - <!-- <div class="item" @click="setTitleLayer"> 51 + <div class="item" @click="setLocation">
52 - <i class="fa fa-cube"></i><br /> 52 + <i class="fa fa-crosshairs"></i><br />
53 - 贴片 53 + 定位
54 - </div> --> 54 + </div>
55 <div v-if="show_walk_route" class="item" @click="setWalkRoute"> 55 <div v-if="show_walk_route" class="item" @click="setWalkRoute">
56 <i class="fa fa-eye"></i><br /> 56 <i class="fa fa-eye"></i><br />
57 步行 57 步行
...@@ -60,17 +60,27 @@ ...@@ -60,17 +60,27 @@
60 <i class="fa fa-eye-slash"></i><br /> 60 <i class="fa fa-eye-slash"></i><br />
61 步行 61 步行
62 </div> 62 </div>
63 + <div v-if="open_safe_route" class="item" @click="handleSafeRoute(true)">
64 + <i class="fa fa-eye"></i><br />
65 + 路线
66 + </div>
67 + <div v-else class="item" @click="handleSafeRoute(false)">
68 + <i class="fa fa-eye-slash"></i><br />
69 + 路线
70 + </div>
63 </div> 71 </div>
64 </div> 72 </div>
73 +
74 + <!-- <div style="position: fixed; bottom: 0; height: 2rem; width: 100%; background-color: white; z-index: 999;"></div> -->
75 +
65 <van-popup v-model:show="show_popup" position="bottom" :overlay="true" :style="{ padding: '1rem', height: '100%' }"> 76 <van-popup v-model:show="show_popup" position="bottom" :overlay="true" :style="{ padding: '1rem', height: '100%' }">
66 <van-icon name="cross" size="1.35rem" @click="show_popup = false" style="float: right; color: gray;" /> 77 <van-icon name="cross" size="1.35rem" @click="show_popup = false" style="float: right; color: gray;" />
67 <div class="popup-wrapper"> 78 <div class="popup-wrapper">
68 <div class="title"> 79 <div class="title">
69 {{ popup_title }} 80 {{ popup_title }}
70 </div> 81 </div>
71 - <div class="content" v-html="popup_content"> 82 + <div class="content" v-html="popup_content"></div>
72 - </div> 83 + <video-player ref="videoPlayer" style="width: 100%; height: 30vh; margin-top: 1rem;"
73 - <video-player ref="videoPlayer" style="width: 100%; height: 10rem;"
74 poster="https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100" 84 poster="https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100"
75 :src="video_src" class="video-player vjs-big-play-centered" controls :loop="true" :volume="0.6"></video-player> 85 :src="video_src" class="video-player vjs-big-play-centered" controls :loop="true" :volume="0.6"></video-player>
76 </div> 86 </div>
...@@ -264,7 +274,7 @@ export default { ...@@ -264,7 +274,7 @@ export default {
264 layers: [ 274 layers: [
265 // new AMap.TileLayer.RoadNet(), 275 // new AMap.TileLayer.RoadNet(),
266 ], 276 ],
267 - features: ['bg'], // 设置地图上显示的元素种类 277 + features: ['bg', 'road'], // 设置地图上显示的元素种类
268 animateEnable: false, // 地图平移过程中是否使用动画 278 animateEnable: false, // 地图平移过程中是否使用动画
269 }); 279 });
270 // 添加地图点击事件 280 // 添加地图点击事件
...@@ -451,10 +461,12 @@ export default { ...@@ -451,10 +461,12 @@ export default {
451 } 461 }
452 // 绑定景点的点击事件 - 文字出现才能触发 462 // 绑定景点的点击事件 - 文字出现才能触发
453 var clickListener = marker.on('click', (e) => { 463 var clickListener = marker.on('click', (e) => {
454 - this.show_popup = true; 464 + // this.show_popup = true;
455 - this.popup_title = x.name; 465 + // this.popup_title = x.name;
456 - this.popup_content = x.note; 466 + // this.popup_content = x.note;
457 - this.video_src = 'https://video.pearvideo.com/mp4/short/20200209/cont-1650197-14888002-hd.mp4' 467 + // this.video_src = 'https://video.pearvideo.com/mp4/short/20200209/cont-1650197-14888002-hd.mp4'
468 + // this.positionMarker(coord.spotInfo[i].position);
469 + this.positionMarker([120.587519, 31.315924]);
458 }) 470 })
459 // 471 //
460 this.spotInfo.push(marker); 472 this.spotInfo.push(marker);
...@@ -715,7 +727,7 @@ export default { ...@@ -715,7 +727,7 @@ export default {
715 setTitleLayer() { 727 setTitleLayer() {
716 var layer = new AMap.TileLayer.Flexible({ 728 var layer = new AMap.TileLayer.Flexible({
717 cacheSize: 50, 729 cacheSize: 50,
718 - opacity: 1, 730 + opacity: 0.5,
719 zIndex: 100, 731 zIndex: 100,
720 createTile: function (x, y, z, success, fail) { 732 createTile: function (x, y, z, success, fail) {
721 if (z === 17) { 733 if (z === 17) {
...@@ -738,7 +750,6 @@ export default { ...@@ -738,7 +750,6 @@ export default {
738 return; 750 return;
739 } 751 }
740 } 752 }
741 - console.warn(z);
742 753
743 var img = document.createElement('img'); 754 var img = document.createElement('img');
744 img.onload = function () { 755 img.onload = function () {
...@@ -899,12 +910,11 @@ export default { ...@@ -899,12 +910,11 @@ export default {
899 handleNavPopup() { 910 handleNavPopup() {
900 this.show_nav_popup = !this.show_nav_popup 911 this.show_nav_popup = !this.show_nav_popup
901 }, 912 },
902 - positionMarker() { 913 + positionMarker(position = [120.587519, 31.315924]) {
903 - // this.setInfoWindow([120.587519, 31.315924])
904 // 点击后创建自定义信息窗口 914 // 点击后创建自定义信息窗口
905 - this.setInfoWindows([120.587519, 31.315924]) 915 + this.setInfoWindows(position)
906 // 把地图中心点设置为当前点击的标记点 916 // 把地图中心点设置为当前点击的标记点
907 - this.map.setZoomAndCenter(this.zoom, [120.587519, 31.315924]); 917 + this.map.setZoomAndCenter(this.zoom, position);
908 // 918 //
909 this.show_nav_popup = false; 919 this.show_nav_popup = false;
910 }, 920 },
...@@ -985,14 +995,15 @@ export default { ...@@ -985,14 +995,15 @@ export default {
985 } 995 }
986 996
987 .nav-bar-wrapper { 997 .nav-bar-wrapper {
988 - position: absolute; 998 + position: fixed;
989 - top: 0; 999 + bottom: 0;
990 left: 0; 1000 left: 0;
991 - right: 0;
992 height: 4.5rem; 1001 height: 4.5rem;
1002 + width: 100%;
993 background-color: white; 1003 background-color: white;
994 text-align: center; 1004 text-align: center;
995 box-shadow: 0 2px 2px rgba(0, 0, 0, .2); 1005 box-shadow: 0 2px 2px rgba(0, 0, 0, .2);
1006 + z-index: 999;
996 1007
997 .item { 1008 .item {
998 padding-top: 0.5rem; 1009 padding-top: 0.5rem;
...@@ -1005,7 +1016,7 @@ export default { ...@@ -1005,7 +1016,7 @@ export default {
1005 1016
1006 .safe-route-wrapper { 1017 .safe-route-wrapper {
1007 position: absolute; 1018 position: absolute;
1008 - bottom: 1rem; 1019 + bottom: 2rem;
1009 right: 1rem; 1020 right: 1rem;
1010 background-color: white; 1021 background-color: white;
1011 } 1022 }
...@@ -1045,7 +1056,10 @@ export default { ...@@ -1045,7 +1056,10 @@ export default {
1045 margin-bottom: 0.85rem; 1056 margin-bottom: 0.85rem;
1046 } 1057 }
1047 1058
1048 - .content {} 1059 + .content {
1060 + line-height: 1.75;
1061 + font-size: 0.95rem;
1062 + }
1049 } 1063 }
1050 1064
1051 1065
...@@ -1057,4 +1071,8 @@ export default { ...@@ -1057,4 +1071,8 @@ export default {
1057 -ms-overflow-style: none; 1071 -ms-overflow-style: none;
1058 overflow: -moz-scrollbars-none; 1072 overflow: -moz-scrollbars-none;
1059 } 1073 }
1074 +
1075 +.van-dialog__confirm, .van-dialog__confirm:active {
1076 + color: #AB8F57;
1077 +}
1060 </style> 1078 </style>
......