Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
梁建民
/
fk
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
c0650ee9
authored
May 21, 2024
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
add
parent
2fed410f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
31 deletions
js/global.js
js/global.js
View file @
c0650ee9
...
...
@@ -67,37 +67,39 @@
},
mapChange
:
function
()
{
// 初始化地图
var
map
=
new
BMap
.
Map
(
"map"
);
var
point
=
new
BMap
.
Point
(
114.23859
,
22.313236
);
// 香港九龙观塘成业街27号日昇中心的经纬度
map
.
centerAndZoom
(
point
,
18
);
// 设置中心点和缩放级别
// 添加标注
var
marker
=
new
BMap
.
Marker
(
point
);
map
.
addOverlay
(
marker
);
// 开启鼠标滚轮缩放
map
.
enableScrollWheelZoom
(
true
);
// 设置标注跳动
marker
.
setAnimation
(
BMAP_ANIMATION_BOUNCE
);
// 信息窗口内容
var
infoContent
=
"<div style='line-height:1.5;'>"
+
"<p style='font-weight: bold;color: #000;'>香港富开有限公司</p>"
+
"<p>电话:+852-3580-8309</p>"
+
"<p>邮箱:info@hopskyhk.com</p>"
+
"<p>地址:香港九龙观塘成业街27号日昇中心9楼903C2室</p>"
+
"</div>"
;
// 添加信息窗口
var
infoWindow
=
new
BMap
.
InfoWindow
(
infoContent
);
map
.
openInfoWindow
(
infoWindow
,
point
);
// 页面加载时打开信息窗口
// 点击标注时再次打开信息窗口
marker
.
addEventListener
(
"click"
,
function
()
{
map
.
openInfoWindow
(
infoWindow
,
point
);
});
if
(
$
(
"#map"
).
length
>
0
)
{
// 初始化地图
var
map
=
new
BMap
.
Map
(
"map"
);
var
point
=
new
BMap
.
Point
(
114.23859
,
22.313236
);
// 香港九龙观塘成业街27号日昇中心的经纬度
map
.
centerAndZoom
(
point
,
18
);
// 设置中心点和缩放级别
// 添加标注
var
marker
=
new
BMap
.
Marker
(
point
);
map
.
addOverlay
(
marker
);
// 开启鼠标滚轮缩放
map
.
enableScrollWheelZoom
(
true
);
// 设置标注跳动
marker
.
setAnimation
(
BMAP_ANIMATION_BOUNCE
);
// 信息窗口内容
var
infoContent
=
"<div style='line-height:1.5;'>"
+
"<p style='font-weight: bold;color: #000;'>香港富开有限公司</p>"
+
"<p>电话:+852-3580-8309</p>"
+
"<p>邮箱:info@hopskyhk.com</p>"
+
"<p>地址:香港九龙观塘成业街27号日昇中心9楼903C2室</p>"
+
"</div>"
;
// 添加信息窗口
var
infoWindow
=
new
BMap
.
InfoWindow
(
infoContent
);
map
.
openInfoWindow
(
infoWindow
,
point
);
// 页面加载时打开信息窗口
// 点击标注时再次打开信息窗口
marker
.
addEventListener
(
"click"
,
function
()
{
map
.
openInfoWindow
(
infoWindow
,
point
);
});
}
},
handleBind
:
function
(
opt
)
{
...
...
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