hookehuyr

测试导航地图

......@@ -10,6 +10,7 @@ export {}
declare module '@vue/runtime-core' {
export interface GlobalComponents {
AudioBackground: typeof import('./src/components/audioBackground.vue')['default']
Floor: typeof import('./src/components/Floor/index.vue')['default']
InfoWindow: typeof import('./src/components/InfoWindow.vue')['default']
InfoWindowLite: typeof import('./src/components/InfoWindowLite.vue')['default']
InfoWindowWarn: typeof import('./src/components/InfoWindowWarn.vue')['default']
......
<!--
* @Date: 2023-05-31 16:10:33
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-07-25 10:56:25
* @LastEditTime: 2023-07-27 11:08:28
* @FilePath: /map-demo/index.html
* @Description: 文件描述
-->
......
No preview for this file type
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>
This is a custom SVG font generated by IcoMoon.
<iconset grid="14"></iconset>
</metadata>
<defs>
<font id="codropsicons" horiz-adv-x="448" >
<font-face units-per-em="448" ascent="384" descent="-64" />
<missing-glyph horiz-adv-x="448" />
<glyph unicode="&#xe001;" d="M 221.657,359.485 ,m0.00,0.00,c 0.00,0.00 -132.984-182.838 -132.205-286.236 0.515-68.522 61.089-123.688 135.314-123.218 74.202,0.479 133.943,56.421 133.428,124.943 C 357.414,178.368 221.657,359.485 221.657,359.485 z" />
<glyph unicode="&#xe004;" d="M 384.00,160.00l0.00-32.00 q0.00-13.25 -8.125-22.625t-21.125-9.375l-176.00,0.00 l 73.25-73.50q 9.50-9.00 9.50-22.50t-9.50-22.50l-18.75-19.00q-9.25-9.25 -22.50-9.25q-13.00,0.00 -22.75,9.25l-162.75,163.00q-9.25,9.25 -9.25,22.50q0.00,13.00 9.25,22.75l 162.75,162.50q 9.50,9.50 22.75,9.50q 13.00,0.00 22.50-9.50l 18.75-18.50q 9.50-9.50 9.50-22.75t-9.50-22.75l-73.25-73.25l 176.00,0.00 q 13.00,0.00 21.125-9.375 t 8.125-22.625z" horiz-adv-x="384" />
<glyph unicode="&#xe002;" d="M 407.273-23.273c0.00,0.00-325.818,0.00-366.545,0.00s-40.727,40.727-40.727,40.727l0.00,142.545 l 101.818,183.273l 244.364,0.00 l 101.818-183.273c0.00,0.00,0.00-101.818,0.00-142.545S 407.273-23.273, 407.273-23.273z M 325.818,302.545L 122.182,302.545
l-71.273-142.545L 142.545,160.00 c0.00,0.00, 40.727,0.00, 40.727-40.727l0.00-20.364 l 81.455,0.00 l0.00,20.364 c0.00,0.00,0.00,40.727, 40.727,40.727l 91.636,0.00 L 325.818,302.545z M 407.273,119.273l-96.911,0.00 C 307.532,113.917, 305.455,107.503, 305.455,98.909c0.00-40.727-40.727-40.727-40.727-40.727L 183.273,58.182 c0.00,0.00-40.727,0.00-40.727,40.727
c0.00,8.593-2.077,15.008-4.908,20.364L 40.727,119.273 l0.00-101.818 l 366.545,0.00 L 407.273,119.273 z M 132.364,221.091l 183.273,0.00 L 325.818,200.727L 122.182,200.727 L 132.364,221.091z M 152.727,261.818l 142.545,0.00 L 305.455,241.455L 142.545,241.455 L 152.727,261.818z" />
<glyph unicode="&#xe000;" d="M 368.00,144.00q0.00-13.50 -9.25-22.75l-162.75-162.75q-9.75-9.25 -22.75-9.25q-12.75,0.00 -22.50,9.25l-18.75,18.75q-9.50,9.50 -9.50,22.75t 9.50,22.75l 73.25,73.25l-176.00,0.00 q-13.00,0.00 -21.125,9.375t-8.125,22.625l0.00,32.00 q0.00,13.25 8.125,22.625t 21.125,9.375l 176.00,0.00 l-73.25,73.50q-9.50,9.00 -9.50,22.50t 9.50,22.50l 18.75,18.75q 9.50,9.50 22.50,9.50q 13.25,0.00 22.75-9.50l 162.75-162.75q 9.25-8.75 9.25-22.50z" horiz-adv-x="384" />
<glyph unicode="&#xe003;" d="M 224.00-64.00C 100.291-64.00,0.00,36.291,0.00,160.00S 100.291,384.00, 224.00,384.00s 224.00-100.291, 224.00-224.00S 347.709-64.00, 224.00-64.00z
M 224.00,343.273c-101.228,0.00-183.273-82.045-183.273-183.273s 82.045-183.273, 183.273-183.273s 183.273,82.045, 183.273,183.273S 325.228,343.273, 224.00,343.273z M 244.364,122.164C 244.364,111.005, 244.364,98.909, 244.364,98.909l-40.727,0.00 c0.00,0.00,0.00,29.466,0.00,40.727
s 9.123,20.364, 20.364,20.364l0.00,0.00c 22.481,0.00, 40.727,18.246, 40.727,40.727s-18.246,40.727-40.727,40.727S 183.273,223.209, 183.273,200.727c0.00-7.453, 2.138-14.356, 5.641-20.364L 145.437,180.364 C 143.727,186.90, 142.545,193.661, 142.545,200.727
c0.00,44.983, 36.471,81.455, 81.455,81.455s 81.455-36.471, 81.455-81.455C 305.455,162.831, 279.45,131.247, 244.364,122.164z M 244.364,37.818l-40.727,0.00 l0.00,40.727 l 40.727,0.00 L 244.364,37.818 z" />
<glyph unicode="&#x20;" horiz-adv-x="224" />
<glyph class="hidden" unicode="&#xf000;" d="M0,384L 448 -64L0 -64 z" horiz-adv-x="0" />
</font></defs></svg>
\ No newline at end of file
No preview for this file type
Icon Set: Font Awesome -- http://fortawesome.github.com/Font-Awesome/
License: SIL -- http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL
Icon Set: Eco Ico -- http://dribbble.com/shots/665585-Eco-Ico
License: CC0 -- http://creativecommons.org/publicdomain/zero/1.0/
\ No newline at end of file
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 1200 800" style="enable-background:new 0 0 1200 800;" xml:space="preserve">
<style type="text/css">
.st0{fill:#DCDBDB;}
.st1{fill:none;stroke:#FFFFFF;stroke-width:20;}
.st2{fill:#BCBCBC;}
.st3{fill:#A5D5A1;}
.st4{fill:#9BD9E3;}
.st5{fill:#636363;}
</style>
<path class="st0" d="M1200,116.8H0V-3.1h1200V116.8z"/>
<path class="st1" d="M1200,56.9H0"/>
<path class="st2" d="M1055.9,793.9H912.8V196.7h143.1V793.9z"/>
<path class="st2" d="M1200,585.2h-127V196.7h127V585.2z"/>
<path class="st2" d="M896.7,736.6H781.3v-36.2h115.4V736.6z"/>
<circle class="st3" cx="273.1" cy="743" r="51.1"/>
<path class="st2" d="M284.8,235h-86.9v-94.4h86.9V235z"/>
<path class="st0" d="M130.5,801.1H0V117h130.5V801.1z"/>
<path class="st1" d="M65.2,796.9v-734"/>
<path class="st2" d="M284.8,505.8h-43.4V255h43.4V505.8z"/>
<path class="st2" d="M221.1,505.7h-68.8V255.1h68.8V505.7z"/>
<path class="st2" d="M182.6,196.7h-30.3v-57.5h30.3V196.7z"/>
<path class="st2" d="M770.7,736.6H655.3v-36.2h115.4V736.6z"/>
<path class="st2" d="M896.7,783.1H781.3v-36.2h115.4V783.1z"/>
<path class="st2" d="M770.7,783.1H655.3v-36.2h115.4V783.1z"/>
<path class="st4" d="M1170.7,770.4c-30.4,23.4-88.2,6.4-96.9-18.4c-7.7-22,25.6-43.5,15-75.2c-3.8-11.5-10.9-16.8-11.7-31.7
c-0.1-2.4-1-24,10-31.7c16.5-11.6,57.1,9.5,78.5,38.4C1189.7,684.3,1203.3,745.2,1170.7,770.4z"/>
<circle class="st3" cx="190.6" cy="578.6" r="42.8"/>
<circle class="st3" cx="1158" cy="156.8" r="30"/>
<circle class="st3" cx="1086" cy="156.8" r="30"/>
<circle class="st3" cx="1011.7" cy="156.8" r="30"/>
<path class="st2" d="M637.5,783.1H340.3v-80.8h297.2V783.1z"/>
<circle class="st3" cx="176.3" cy="751.5" r="27.1"/>
<path class="st0" d="M898.6,683.5H127V641h771.6V683.5z"/>
<circle class="st3" cx="265.1" cy="595.7" r="22.7"/>
<circle class="st3" cx="940.8" cy="156.8" r="30"/>
<g>
<path class="st5" d="M251.2,194.2v-14.8c0-2-1.6-3.6-3.6-3.6h-4.4v-2h4v-2h-12v2h4v2h-4.4c-2,0-3.6,1.6-3.6,3.6v14.8
c0,2,1.6,3.6,3.6,3.6h0.4l-1.4,2h-2.6v2h1.4l-1.4,2h4l1.2-2h9.8l1.2,2h4l-1.4-2h1.2v-2h-2.6l-1.4-2h0.4
C249.6,197.8,251.2,196.2,251.2,194.2z M233.2,179.6c0-1,0.8-1.8,1.8-1.8h12.2c1.2,0,2,0.8,2,1.8v4.2c0,1.2-0.8,2-1.8,2H235
c-1,0-1.8-0.8-1.8-1.8C233.2,184,233.2,179.6,233.2,179.6z M233.2,193.8c0-1.2,0.8-2,2-2c1.2,0,2,0.8,2,2s-0.8,2-2,2
C234,195.8,233.2,195,233.2,193.8z M245,199.8h-7.6l1.2-2h5.2L245,199.8z M245.2,193.8c0-1.2,0.8-2,2-2c1.2,0,2,0.8,2,2s-0.8,2-2,2
C246,195.8,245.2,195,245.2,193.8z"/>
<path class="st5" d="M499.3,741c-0.4,0-0.8,0.1-1.3,0.1l-3.3-7.3c-0.2-0.4-0.6-0.6-1-0.6h-2.1c-0.6,0-1.1,0.5-1.1,1.1
c0,0.6,0.5,1.1,1.1,1.1h1.4l0.9,2h-9.2l-0.6-1.4h0.5c0.6,0,1.1-0.5,1.1-1.1s-0.5-1.1-1.1-1.1h-4c-0.6,0-1.1,0.5-1.1,1.1
s0.5,1.1,1.1,1.1h1.1l1.1,2.3l-2.1,3.1c-0.7-0.3-1.4-0.4-2.2-0.4c-3.1,0-5.6,2.5-5.6,5.6c0,3.1,2.5,5.6,5.6,5.6
c2.7,0,5-1.9,5.5-4.5h0.9c0.5,1.3,1.9,2.1,3.4,1.8c1.6-0.3,2.6-1.9,2.3-3.5c0-0.2-0.1-0.4-0.2-0.6l4.9-5l0.8,1.7
c-1.4,1-2.3,2.7-2.3,4.5c0,3.1,2.5,5.6,5.6,5.6s5.6-2.5,5.6-5.6C504.9,743.5,502.4,741,499.3,741L499.3,741z M485.5,744.5
c-0.3,0.3-0.5,0.6-0.6,1H484c-0.2-1.1-0.7-2.1-1.5-2.8l1.3-2L485.5,744.5L485.5,744.5z M481.2,744.6c0.2,0.3,0.4,0.6,0.5,0.9h-1.1
L481.2,744.6z M478.5,750c-1.9,0-3.4-1.5-3.4-3.4c0-1.9,1.5-3.4,3.4-3.4c0.3,0,0.6,0.1,0.9,0.1l-1.8,2.6c-0.2,0.3-0.3,0.8-0.1,1.1
c0.2,0.4,0.6,0.6,1,0.6h3.2C481.2,749,480,750,478.5,750L478.5,750z M488.8,743.9c-0.4-0.2-0.8-0.2-1.3-0.2l-1.8-4h7.3
C493,739.6,488.8,743.9,488.8,743.9z M499.3,750c-1.9,0-3.4-1.5-3.4-3.4c0-1,0.4-1.8,1.1-2.5l1.3,2.9c0.2,0.4,0.6,0.6,1,0.6
c0.2,0,0.3,0,0.4-0.1c0.6-0.2,0.8-0.9,0.5-1.4l-1.3-2.9c0.1,0,0.2,0,0.3,0c1.9,0,3.4,1.5,3.4,3.4C502.7,748.5,501.2,750,499.3,750z
"/>
<g>
<path class="st5" d="M175.8,373.3c0.2,0,0.3,0,0.6,0c1,0,1.8-0.2,2.4-0.8c0.4-0.4,0.7-1,0.7-1.7c0-0.7-0.3-1.3-0.8-1.7
c-0.5-0.4-1.2-0.6-2.2-0.6c-1,0-1.7,0.1-2.2,0.2v7.2h1.6L175.8,373.3L175.8,373.3z M175.8,369.9c0.1,0,0.3-0.1,0.7-0.1
c0.8,0,1.3,0.4,1.3,1.1c0,0.7-0.5,1.2-1.4,1.2c-0.2,0-0.4,0-0.6,0L175.8,369.9L175.8,369.9z"/>
<path class="st5" d="M172.7,378.2h8.1c1,0,1.9-0.8,1.9-1.9v-8.1c0-1-0.8-1.9-1.9-1.9h-8.1c-1,0-1.9,0.8-1.9,1.9v8.1
C170.9,377.4,171.7,378.2,172.7,378.2z M172.3,368.3c0-0.3,0.2-0.5,0.5-0.5h7.9c0.3,0,0.5,0.2,0.5,0.5v7.9c0,0.3-0.2,0.5-0.5,0.5
h-7.9c-0.3,0-0.5-0.2-0.5-0.5C172.3,376.2,172.3,368.3,172.3,368.3z"/>
<path class="st5" d="M178.4,388c-1.8,0-3.3,1.5-3.3,3.3c0,1.8,1.5,3.3,3.3,3.3c1.8,0,3.3-1.5,3.3-3.3
C181.7,389.4,180.2,388,178.4,388z M178.4,392.2c-0.5,0-1-0.4-1-1c0-0.5,0.4-1,1-1c0.5,0,1,0.4,1,1
C179.4,391.8,179,392.2,178.4,392.2z"/>
<path class="st5" d="M202.2,388.5l-0.5-4.3c-0.1-0.8-0.8-1.4-1.7-1.4l-1.2,0.1l-3.6-3.3c-0.3-0.3-0.8-0.5-1.3-0.5l-7.4,0
c-1.7,0-3.3,0.6-4.5,1.6l-4.1,3.3l-5.5,1.4c-0.7,0.2-1.2,0.8-1.2,1.5v1.6c-0.2,0-0.4,0.2-0.4,0.4v2.1c0,0.3,0.2,0.5,0.5,0.5h3.1
c0-0.1,0-0.3,0-0.4c0-2.3,1.8-4.1,4.1-4.1s4.1,1.8,4.1,4.1c0,0.1,0,0.3,0,0.4h8.6c0-0.1,0-0.3,0-0.4c0-2.3,1.8-4.1,4.1-4.1
c2.3,0,4.1,1.8,4.1,4.1c0,0.1,0,0.3,0,0.4h2.9c0.3,0,0.5-0.2,0.5-0.5v-2C202.7,388.8,202.5,388.5,202.2,388.5L202.2,388.5z
M191.2,383.2l-10.3,0.5l2-1.6c1.1-0.9,2.4-1.3,3.8-1.3h4.5C191.2,380.8,191.2,383.2,191.2,383.2z M192.9,383.1v-2.3h0.7
c0.2,0,0.5,0.1,0.6,0.2l2.1,1.9C196.3,383,192.9,383.1,192.9,383.1z"/>
<path class="st5" d="M195.2,388c-1.8,0-3.3,1.5-3.3,3.3c0,1.8,1.5,3.3,3.3,3.3c1.8,0,3.3-1.5,3.3-3.3
C198.4,389.4,197,388,195.2,388z M195.2,392.2c-0.5,0-1-0.4-1-1c0-0.5,0.4-1,1-1c0.5,0,1,0.4,1,1
C196.2,391.8,195.7,392.2,195.2,392.2z"/>
</g>
<path class="st5" d="M287.6,752.3h-5.8v-2.2h1.1c0.4,0,0.7-0.3,0.7-0.7c0-0.4-0.3-0.7-0.7-0.7h-3.7c-0.4,0-0.7,0.3-0.7,0.7
c0,0.4,0.3,0.7,0.7,0.7h1.1v2.2h-11.6v-5h5.8c0.3,0,0.6-0.2,0.7-0.4c0.1-0.3,0.1-0.6-0.1-0.8l-3.7-4h1.7c0.3,0,0.6-0.2,0.7-0.4
c0.1-0.3,0.1-0.6-0.1-0.8l-3.4-3.7h1.7c0.3,0,0.6-0.2,0.7-0.4c0.1-0.3,0.1-0.6-0.1-0.8l-4.7-5c-0.3-0.3-0.8-0.3-1.1,0l-4.7,5
c-0.2,0.2-0.2,0.5-0.1,0.8c0.1,0.3,0.4,0.4,0.7,0.4h1.7l-3.4,3.7c-0.2,0.2-0.2,0.5-0.1,0.8c0.1,0.3,0.4,0.4,0.7,0.4h1.7l-3.7,4
c-0.2,0.2-0.2,0.5-0.1,0.8s0.4,0.4,0.7,0.4h5.8v5h-7.3c-0.8,0-1.5,0.7-1.5,1.5c0,0.8,0.7,1.5,1.5,1.5h29.1c0.8,0,1.5-0.7,1.5-1.5
C289.1,753,288.4,752.3,287.6,752.3L287.6,752.3z"/>
</g>
</svg>
/*
* @Date: 2023-05-29 11:10:19
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-07-17 13:24:17
* @LastEditTime: 2023-07-27 11:04:44
* @FilePath: /map-demo/src/route.js
* @Description: 文件描述
*/
......
<!--
* @Date: 2023-05-19 14:54:27
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-07-25 17:07:18
* @LastEditTime: 2023-07-26 06:02:36
* @FilePath: /map-demo/src/views/index.vue
* @Description: 公众地图主体页面
-->
......
<!--
* @Date: 2023-05-19 14:54:27
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-07-25 11:05:53
* @LastEditTime: 2023-07-27 15:00:30
* @FilePath: /map-demo/src/views/inner.vue
* @Description: 内部地图主体页面
-->
......@@ -36,21 +36,25 @@
</div>
<div class="operate-bar-wrapper">
<div class="box-wrapper">
<div class="item" @click="testFloor">
<van-icon name="https://cdn.ipadbiz.cn/xys/map/%E5%AE%9A%E4%BD%8Dloc@2x.png" size="1.5rem"
style="vertical-align: ;" />
</div>
<div v-if="open_current_location" class="item" @click="handleLocation(true)">
<van-icon name="https://cdn.ipadbiz.cn/xys/map/%E5%AE%9A%E4%BD%8Dloc@2x.png" size="1.5rem"
style="vertical-align: middle;" />
style="vertical-align: ;" />
</div>
<div v-else class="item" @click="handleLocation(false)">
<van-icon name="https://cdn.ipadbiz.cn/xys/map/%E5%AE%9A%E4%BD%8Dloc@2x.png" size="1.5rem"
style="vertical-align: middle;" />
style="vertical-align: ;" />
</div>
<div v-if="open_safe_route" class="item" @click="handleSafeRoute(true)">
<van-icon name="https://cdn.ipadbiz.cn/xys/map/%E7%BA%BF%E8%B7%AF01.png" size="1.25rem"
style="vertical-align: middle;" />
style="vertical-align: ;" />
</div>
<div v-else class="item" @click="handleSafeRoute(false)">
<van-icon name="https://cdn.ipadbiz.cn/xys/map/%E7%BA%BF%E8%B7%AF02.png" size="1.25rem"
style="vertical-align: middle;" />
style="vertical-align: ;" />
</div>
</div>
</div>
......@@ -114,6 +118,10 @@
</div>
</div>
</van-popup>
<van-popup v-model:show="show_floor_popup" position="bottom" :overlay="true" :style="{ height: '100%', background: '#F7F8FA' }">
<Floor @close="onClose"></Floor>
</van-popup>
</div>
</template>
......@@ -131,6 +139,7 @@ import InfoWindow from '@/components/InfoWindow'
import InfoWindowLite from '@/components/InfoWindowLite'
import InfoWindowWarn from '@/components/InfoWindowWarn'
import InfoWindowYard from '@/components/InfoWindowYard'
import Floor from '@/components/Floor'
import { useRect } from '@vant/use';
import { mapAPI } from '@/api/map.js'
import wx from 'weixin-js-sdk'
......@@ -192,7 +201,7 @@ const GPS = {
};
export default {
components: { InfoWindow, InfoWindowLite, InfoWindowWarn, InfoWindowYard },
components: { InfoWindow, InfoWindowLite, InfoWindowWarn, InfoWindowYard, Floor },
data() {
return {
map: '',
......@@ -267,7 +276,8 @@ export default {
open_current_location: true,
point_range: [ // 景区范围经纬度
[120.585111, 31.316084], [120.585111, 31.316084], [120.589488, 31.313197], [120.585422, 31.313005]
]
],
show_floor_popup: false,
}
},
async mounted() {
......@@ -1182,6 +1192,12 @@ export default {
// this.map.add(this.spotInfo);
},
onPause (name) {},
testFloor () {
this.show_floor_popup = true;
},
onClose () {
this.show_floor_popup = false;
}
}
}
</script>
......