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
2023-07-25 18:08:10 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
bcdcb9cb6e3518fae2913e8aee123d5d36d9fb09
bcdcb9cb
1 parent
3ed455f2
fix 地图路径调整
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
30 deletions
index.html
src/common/my_router.js
src/views/index.vue
src/views/inner.vue
index.html
View file @
bcdcb9c
<!--
* @Date: 2023-05-31 16:10:33
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-07-
17 22:06:14
* @LastEditTime: 2023-07-
25 10:56:25
* @FilePath: /map-demo/index.html
* @Description: 文件描述
-->
...
...
@@ -19,9 +19,9 @@
<script
type=
"module"
src=
"/src/main.js"
></script>
<script
type=
"text/javascript"
>
// window.forceWebGL = true;
window
.
_AMapSecurityConfig
=
{
securityJsCode
:
'8602057c4c8dae5bed9a240c0582c46f'
,
}
//
window._AMapSecurityConfig = {
//
securityJsCode:'8602057c4c8dae5bed9a240c0582c46f',
//
}
// window._AMapSecurityConfig = {
// serviceHost: 'https://oa-dev.onwall.cn/_AMapService',
// }
...
...
src/common/my_router.js
View file @
bcdcb9c
...
...
@@ -9,13 +9,16 @@ const testInfo = [
[
120.587856
,
31.313099
],
[
120.587823
,
31.313276
],
[
120.587811
,
31.313508
],
[
120.587736
,
31.314093
],
[
120.5875
,
31.31407
],
[
120.587103
,
31.314234
],
[
120.587046
,
31.314125
],
[
120.586958
,
31.314132
],
[
120.586912
,
31.314195
],
[
120.586812
,
31.314049
],
[
120.587745
,
31.313944
],
[
120.587395
,
31.313921
],
[
120.587364
,
31.314165
],
[
120.587098
,
31.314181
],
[
120.587061
,
31.314176
],
[
120.58706
,
31.314124
],
[
120.586937
,
31.31412
],
[
120.586937
,
31.314144
],
[
120.586875
,
31.314139
],
[
120.58688
,
31.31406
],
],
distance
:
''
,
},
...
...
@@ -31,11 +34,11 @@ const testInfo = [
[
120.587811
,
31.313508
],
[
120.587736
,
31.314093
],
[
120.5875
,
31.31407
],
[
120.587458
,
31.314335
],
[
120.587707
,
31.314354
],
[
120.587458
,
31.314335
],
[
120.587707
,
31.314354
],
[
120.58769
,
31.314535
],
[
120.587352
,
31.314496
],
[
120.587352
,
31.31482
],
[
120.587352
,
31.31482
],
[
120.587176
,
31.314839
],
[
120.587113
,
31.314473
],
[
120.586966
,
31.314526
],
...
...
@@ -57,18 +60,15 @@ const testInfo = [
[
120.587811
,
31.313508
],
[
120.587736
,
31.314093
],
[
120.587985
,
31.31411
],
[
120.587958
,
31.314381
],
[
120.587698
,
31.314349
],
[
120.587958
,
31.314381
],
[
120.587698
,
31.314349
],
[
120.58769
,
31.314535
],
[
120.587882
,
31.314598
],
[
120.587882
,
31.314598
],
[
120.58798
,
31.314679
],
[
120.58791
,
31.314799
],
[
120.587621
,
31.31513
],
[
120.58758
,
31.315273
],
[
120.5874
,
31.315266
],
[
120.587295
,
31.315548
],
[
120.587574
,
31.315582
],
[
120.587853
,
31.315603
],
[
120.587621
,
31.31513
],
[
120.58758
,
31.315273
],
[
120.5874
,
31.315266
],
],
distance
:
''
,
},
...
...
src/views/index.vue
View file @
bcdcb9c
<!--
* @Date: 2023-05-19 14:54:27
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-07-2
4 22:27:44
* @LastEditTime: 2023-07-2
5 17:07:18
* @FilePath: /map-demo/src/views/index.vue
* @Description: 公众地图主体页面
-->
...
...
@@ -37,11 +37,11 @@
<div class="operate-bar-wrapper">
<div class="box-wrapper">
<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.
2
5rem"
<van-icon name="https://cdn.ipadbiz.cn/xys/map/%E5%AE%9A%E4%BD%8Dloc@2x.png" size="1.5rem"
style="vertical-align: middle;" />
</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.
2
5rem"
<van-icon name="https://cdn.ipadbiz.cn/xys/map/%E5%AE%9A%E4%BD%8Dloc@2x.png" size="1.5rem"
style="vertical-align: middle;" />
</div>
<!-- <div class="item" @click="selectRoute">
...
...
@@ -918,7 +918,7 @@ export default {
e.lnglat.getLng() +
"," +
e.lnglat.getLat() +
"]"
"]
,
"
console.log(text);
// 点击空白处 关闭弹框
this.closeInfoWindow();
...
...
src/views/inner.vue
View file @
bcdcb9c
<!--
* @Date: 2023-05-19 14:54:27
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-07-25
05:53
:53
* @LastEditTime: 2023-07-25
11:05
:53
* @FilePath: /map-demo/src/views/inner.vue
* @Description: 内部地图主体页面
-->
...
...
@@ -37,11 +37,11 @@
<div class="operate-bar-wrapper">
<div class="box-wrapper">
<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.
2
5rem"
<van-icon name="https://cdn.ipadbiz.cn/xys/map/%E5%AE%9A%E4%BD%8Dloc@2x.png" size="1.5rem"
style="vertical-align: middle;" />
</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.
2
5rem"
<van-icon name="https://cdn.ipadbiz.cn/xys/map/%E5%AE%9A%E4%BD%8Dloc@2x.png" size="1.5rem"
style="vertical-align: middle;" />
</div>
<div v-if="open_safe_route" class="item" @click="handleSafeRoute(true)">
...
...
Please
register
or
login
to post a comment