|
|
1
|
+<!DOCTYPE html>
|
|
|
2
|
+<html lang="en">
|
|
|
3
|
+
|
|
|
4
|
+<head>
|
|
|
5
|
+ <meta charset="UTF-8">
|
|
|
6
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
7
|
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
|
8
|
+ <title>聯繫我們</title>
|
|
|
9
|
+ <link rel="stylesheet" href="__TMPL__/public/assets/css/wbase.css">
|
|
|
10
|
+ <script src="__TMPL__/public/assets/js/base.js"></script>
|
|
|
11
|
+ <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=hG4FuySg0nLRGkY8pQZsGQVA8jCb81F3"></script>
|
|
|
12
|
+ <style>
|
|
|
13
|
+ .BMapLabel {
|
|
|
14
|
+ background: rgba(255, 255, 255, 1);
|
|
|
15
|
+ opacity: 0.8;
|
|
|
16
|
+ border-radius: 6px;
|
|
|
17
|
+ padding: 0.1rem !important;
|
|
|
18
|
+ box-sizing: border-box !important;
|
|
|
19
|
+ left: -0.13rem !important;
|
|
|
20
|
+ }
|
|
|
21
|
+ /* #map {
|
|
|
22
|
+ margin-top: 35px;
|
|
|
23
|
+ }
|
|
|
24
|
+ */
|
|
|
25
|
+
|
|
|
26
|
+ .anchorBL {
|
|
|
27
|
+ display: none !important;
|
|
|
28
|
+ }
|
|
|
29
|
+ </style>
|
|
|
30
|
+</head>
|
|
|
31
|
+
|
|
|
32
|
+<body>
|
|
|
33
|
+<!--header-->
|
|
|
34
|
+<header class="header">
|
|
|
35
|
+ <img src="{:cmf_get_image_url($logo.image)}" alt="">
|
|
|
36
|
+</header>
|
|
|
37
|
+<!-- 内容 -->
|
|
|
38
|
+<div class="con_box">
|
|
|
39
|
+ <h1>聯繫我們</h1>
|
|
|
40
|
+ <div style="width:100%;height:4.6rem;border:#ccc solid 1px;font-size:12px" id="map"></div>
|
|
|
41
|
+ <div class="con_txt">
|
|
|
42
|
+ <h2>澳德綜合健康中心有限公司</h2>
|
|
|
43
|
+ <p>地址 : 香港九龍灣臨澤街8號傲騰廣場25樓</p>
|
|
|
44
|
+ <p>電話 : (852) 2582 0188</p>
|
|
|
45
|
+ <p>傳真 : (852) 2582 0199</p>
|
|
|
46
|
+ <p>電郵 : info@medisun.hk</p>
|
|
|
47
|
+ </div>
|
|
|
48
|
+</div>
|
|
|
49
|
+</body>
|
|
|
50
|
+<script src="js/jquery.js"></script>
|
|
|
51
|
+<script type="text/javascript">
|
|
|
52
|
+ $('.inpTxt').each(function() {
|
|
|
53
|
+ $(this).focus(function() {
|
|
|
54
|
+ $(this).parents("li").css('border-bottom', '1px solid #E29C6D')
|
|
|
55
|
+ });
|
|
|
56
|
+ });
|
|
|
57
|
+ $('.inpTxt').each(function() {
|
|
|
58
|
+ $(this).blur(function() {
|
|
|
59
|
+ $(this).parents("li").css('border-bottom', '1px solid rgba(230,230,230,1)')
|
|
|
60
|
+ });
|
|
|
61
|
+ });
|
|
|
62
|
+
|
|
|
63
|
+
|
|
|
64
|
+ //创建和初始化地图函数:
|
|
|
65
|
+ function initMap() {
|
|
|
66
|
+ createMap(); //创建地图
|
|
|
67
|
+ setMapEvent(); //设置地图事件
|
|
|
68
|
+ addMapControl(); //向地图添加控件
|
|
|
69
|
+ addMapOverlay(); //向地图添加覆盖物
|
|
|
70
|
+ }
|
|
|
71
|
+
|
|
|
72
|
+ function createMap() {
|
|
|
73
|
+ map = new BMap.Map("map");
|
|
|
74
|
+ map.centerAndZoom(new BMap.Point(114.180029, 22.336225), 15);
|
|
|
75
|
+ }
|
|
|
76
|
+
|
|
|
77
|
+ function setMapEvent() {
|
|
|
78
|
+ map.enableScrollWheelZoom();
|
|
|
79
|
+ map.enableKeyboard();
|
|
|
80
|
+ map.enableDragging();
|
|
|
81
|
+ map.enableDoubleClickZoom()
|
|
|
82
|
+ }
|
|
|
83
|
+
|
|
|
84
|
+ function addClickHandler(target, window) {
|
|
|
85
|
+ target.addEventListener("click", function() {
|
|
|
86
|
+ target.openInfoWindow(window);
|
|
|
87
|
+ });
|
|
|
88
|
+ }
|
|
|
89
|
+
|
|
|
90
|
+ function addMapOverlay() {
|
|
|
91
|
+ var markers = [{
|
|
|
92
|
+ // content: "我的备注",
|
|
|
93
|
+ title: "<p class=“map_p1”>澳德綜合健康中心有限公司</p><p class=“map_p2”>地址 : 香港九龍灣臨澤街8號傲騰廣場<br>25樓</p>",
|
|
|
94
|
+ imageOffset: {
|
|
|
95
|
+ width: -46,
|
|
|
96
|
+ height: -21
|
|
|
97
|
+ },
|
|
|
98
|
+ position: {
|
|
|
99
|
+ lat: 22.338928,
|
|
|
100
|
+ lng: 114.17832
|
|
|
101
|
+ }
|
|
|
102
|
+ }, ];
|
|
|
103
|
+ for (var index = 0; index < markers.length; index++) {
|
|
|
104
|
+ var point = new BMap.Point(markers[index].position.lng, markers[index].position.lat);
|
|
|
105
|
+ var marker = new BMap.Marker(point, {
|
|
|
106
|
+ icon: new BMap.Icon("http://api.map.baidu.com/lbsapi/createmap/images/icon.png", new BMap.Size(20, 25), {
|
|
|
107
|
+ imageOffset: new BMap.Size(markers[index].imageOffset.width, markers[index].imageOffset.height)
|
|
|
108
|
+ })
|
|
|
109
|
+ });
|
|
|
110
|
+ var label = new BMap.Label(markers[index].title, {
|
|
|
111
|
+ offset: new BMap.Size(25, 5)
|
|
|
112
|
+ });
|
|
|
113
|
+ var opts = {
|
|
|
114
|
+ width: 200,
|
|
|
115
|
+ title: markers[index].title,
|
|
|
116
|
+ enableMessage: false
|
|
|
117
|
+ };
|
|
|
118
|
+ var infoWindow = new BMap.InfoWindow(markers[index].content, opts);
|
|
|
119
|
+ marker.setLabel(label);
|
|
|
120
|
+ addClickHandler(marker, infoWindow);
|
|
|
121
|
+ map.addOverlay(marker);
|
|
|
122
|
+ };
|
|
|
123
|
+ var labels = [];
|
|
|
124
|
+ for (var index = 0; index < labels.length; index++) {
|
|
|
125
|
+ var opt = {
|
|
|
126
|
+ position: new BMap.Point(labels[index].position.lng, labels[index].position.lat)
|
|
|
127
|
+ };
|
|
|
128
|
+ var label = new BMap.Label(labels[index].content, opt);
|
|
|
129
|
+ map.addOverlay(label);
|
|
|
130
|
+ };
|
|
|
131
|
+ }
|
|
|
132
|
+ //向地图添加控件
|
|
|
133
|
+ function addMapControl() {
|
|
|
134
|
+ var navControl = new BMap.NavigationControl({
|
|
|
135
|
+ anchor: BMAP_ANCHOR_TOP_LEFT,
|
|
|
136
|
+ type: 2
|
|
|
137
|
+ });
|
|
|
138
|
+ map.addControl(navControl);
|
|
|
139
|
+ }
|
|
|
140
|
+ var map;
|
|
|
141
|
+ initMap();
|
|
|
142
|
+</script>
|
|
|
143
|
+
|
|
|
144
|
+</html |