Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
html
/
MeteorologicalBureau
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e40fdf33
authored
Apr 29, 2020
by
fengfan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new icon
parent
46cd10f6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
map/js/Map3D.js
+14
-14
No files found.
map/js/Map3D.js
View file @
e40fdf33
...
...
@@ -161,11 +161,11 @@ class Map3D {
var
icon
=
new
AMap
.
Icon
({
// 图标尺寸
size
:
new
AMap
.
Size
(
20
,
2
0
),
size
:
new
AMap
.
Size
(
40
,
4
0
),
// 图标的取图地址
image
:
'img/
3
.png'
,
image
:
'img/
icon/人员
.png'
,
// 图标所用图片大小
imageSize
:
new
AMap
.
Size
(
20
,
2
0
),
imageSize
:
new
AMap
.
Size
(
40
,
4
0
),
// 图标取图偏移量
imageOffset
:
new
AMap
.
Pixel
(
0
,
0
)
});
...
...
@@ -173,8 +173,8 @@ class Map3D {
map
:
this
.
map
,
clickable
:
true
,
position
:
new
AMap
.
LngLat
(
Number
(
item
.
lon
),
Number
(
item
.
lat
)),
//基点位置
icon
:
icon
||
'img/
3
.png'
,
//marker图标,直接传递地址url icon||
offset
:
{
x
:
-
10
,
y
:
-
1
0
}
//相对于基点的位置
icon
:
icon
||
'img/
icon/人员
.png'
,
//marker图标,直接传递地址url icon||
offset
:
{
x
:
-
20
,
y
:
-
3
0
}
//相对于基点的位置
});
marker
.
_data
=
item
...
...
@@ -226,11 +226,11 @@ class Map3D {
var
icon
=
new
AMap
.
Icon
({
// 图标尺寸
size
:
new
AMap
.
Size
(
20
,
2
0
),
size
:
new
AMap
.
Size
(
40
,
4
0
),
// 图标的取图地址
image
:
'img/
3
.png'
,
image
:
'img/
icon/人员
.png'
,
// 图标所用图片大小
imageSize
:
new
AMap
.
Size
(
20
,
2
0
),
imageSize
:
new
AMap
.
Size
(
40
,
4
0
),
// 图标取图偏移量
imageOffset
:
new
AMap
.
Pixel
(
0
,
0
)
});
...
...
@@ -238,8 +238,8 @@ class Map3D {
map
:
this
.
map
,
clickable
:
true
,
position
:
new
AMap
.
LngLat
(
Number
(
lon
),
Number
(
lat
)),
//基点位置
icon
:
icon
||
'img/
3
.png'
,
//marker图标,直接传递地址url icon||
offset
:
{
x
:
-
10
+
randomNum
,
y
:
-
1
0
+
randomNum
}
//相对于基点的位置
icon
:
icon
||
'img/
icon/人员
.png'
,
//marker图标,直接传递地址url icon||
offset
:
{
x
:
-
20
+
randomNum
,
y
:
-
3
0
+
randomNum
}
//相对于基点的位置
});
marker
.
_data
=
item
...
...
@@ -308,9 +308,9 @@ class Map3D {
}
setEquipmentPoint
(
item
)
{
var
name
=
'大喇叭'
,
imagestr
=
'img/
喇叭1
.png'
;
if
(
item
.
clientStyle
==
2
)
name
=
'显示屏'
,
imagestr
=
'img/
显示屏1
.png'
;
if
(
item
.
clientStyle
==
3
)
name
=
'北斗'
,
imagestr
=
'img/
卫星1
.png'
;
imagestr
=
'img/
icon/大喇叭
.png'
;
if
(
item
.
clientStyle
==
2
)
name
=
'显示屏'
,
imagestr
=
'img/
icon/显示屏
.png'
;
if
(
item
.
clientStyle
==
3
)
name
=
'北斗'
,
imagestr
=
'img/
icon/北斗
.png'
;
var
html
=
`
<div id=box2>
<div id=title>
${
name
}
</div>
...
...
@@ -358,7 +358,7 @@ class Map3D {
clickable
:
true
,
position
:
new
AMap
.
LngLat
(
Number
(
item
.
lon
),
Number
(
item
.
lat
)),
//基点位置
icon
:
icon
||
imagestr
,
//marker图标,直接传递地址url icon||
offset
:
{
x
:
-
20
,
y
:
-
2
0
}
//相对于基点的位置
offset
:
{
x
:
-
20
,
y
:
-
3
0
}
//相对于基点的位置
});
marker
.
_data
=
item
...
...
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