Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
E
east-nanjing-new
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
郭铭瑶
east-nanjing-new
Commits
200143e5
Commit
200143e5
authored
Nov 29, 2021
by
郭铭瑶
🤘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
地图修改暂存
parent
442972d1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
13 deletions
+15
-13
index.html
index.html
+1
-1
my-map bak.vue
src/components/MyComponent/MyMap/my-map bak.vue
+0
-0
my-map.vue
src/components/MyComponent/MyMap/my-map.vue
+7
-3
test-map.html
src/components/MyComponent/MyMap/test-map.html
+7
-6
main.vue
src/view/main.vue
+0
-3
No files found.
index.html
View file @
200143e5
...
...
@@ -14,7 +14,7 @@
<!-- <script src="/SMap.min.js"></script> -->
<!-- <script src="/dev/SMap.min.js"></script> -->
<!-- <script src="/Plugins.min.js"></script> -->
<
!-- <script src="/hls.js"></script> --
>
<
script
src=
"/hls.js"
></script
>
<script
type=
"module"
src=
"/src/main.ts"
></script>
</body>
...
...
src/components/MyComponent/MyMap/my-map
-
bak.vue
→
src/components/MyComponent/MyMap/my-map
bak.vue
View file @
200143e5
File moved
src/components/MyComponent/MyMap/my-map.vue
View file @
200143e5
...
...
@@ -36,6 +36,7 @@ export default defineComponent({
let
map
:
any
=
null
function
initMap
(
config
?:
any
)
{
map
=
new
JMap
()
window
.
jMap
=
map
map
.
createMap
(
'MapContainer'
,
'6b446c2db7094389aef2acb11e9cd27b'
,
...
...
@@ -55,7 +56,10 @@ export default defineComponent({
map_complete_callback
:
function
()
{
ctx
.
emit
(
'complete'
,
map
)
// addListener()
hideCommunity
()
// hideCommunity()
map
.
queryDistrict
(
'南京东路街道'
)
map
.
switchBuildingModel
(
'BM_G_JianLan,BM_D_JianLan'
)
// map.switchBuildingModel('BM_qianlan_bai')
},
}
)
...
...
@@ -260,7 +264,7 @@ export default defineComponent({
url
:
item
.
icon
||
icon
,
width
:
sizeProp
[
0
],
height
:
sizeProp
[
1
],
pixelOffset
:
[
0
,
-
13
],
pixelOffset
:
[
0
,
0
],
},
label
:
{
text
:
labelKey
?
(
item
[
labelKey
]
||
item
[
key
])
+
''
:
''
,
...
...
@@ -297,7 +301,7 @@ export default defineComponent({
// 删除点
function
remove
(
points
?:
string
[])
{
if
(
!
map
)
return
map
.
Locate
.
clearLocate
(
points
)
points
&&
map
.
Locate
.
clearLocate
(
points
)
}
// 添加线状覆盖物
...
...
src/components/MyComponent/MyMap/test-map.html
View file @
200143e5
...
...
@@ -25,29 +25,30 @@
jMap
.
Locate
.
pointLocate
([{
id
:
"100001"
,
position
:
{
x
:
121.4
7953245042869
,
y
:
31.23356958247664
,
z
:
0
x
:
121.4
6948524003477
,
y
:
31.240552337919738
,
z
:
0
},
attributes
:
{
name
:
"
黄浦区大数据中心
"
,
name
:
"
贵州路263号
"
,
description
:
"测试自定义字段信息"
},
label
:
{
text
:
"
黄浦区大数据中心
"
,
text
:
"
贵州路263号
"
,
font
:
"16px Helvetica"
,
color
:
"rgb(135, 206, 235, 1)"
,
pixelOffset
:
[
0
,
-
50
]
},
image
:
{
url
:
"http://localhost:3002/star.png"
,
width
:
29.5
,
height
:
48.5
,
pixelOffset
:
[
0
,
-
13
]
width
:
14
,
height
:
14
,
pixelOffset
:
[
0
,
0
]
}
}],
{
isZoom
:
false
,
click
:
(
res
)
=>
{
},
})
console
.
log
(
'---'
,
CoordUtil
.
gcj02towgs84
(
121.474008
,
31.238613
))
},
map_left_click_callback
:
function
(
obj
,
type
,
movement
)
{
...
...
src/view/main.vue
View file @
200143e5
...
...
@@ -116,9 +116,6 @@ export default defineComponent({
}
})
const
{
handleMapComplete
,
selectArea
,
handleZoom
}
=
useSwitchMap
(
map
)
// function handleMapComplete() {}
// function selectArea() {}
// function handleZoom() {}
const
onMapClick
=
(
data
:
any
)
=>
{
console
.
log
(
'click: '
,
data
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment