-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathmap-multiple-markers.html
More file actions
130 lines (124 loc) · 3.8 KB
/
map-multiple-markers.html
File metadata and controls
130 lines (124 loc) · 3.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset=utf-8>
<meta name=viewport content="width=device-width, initial-scale=1">
<meta name=description content="OpenLayer - Map multiple markers.">
<title>OpenLayer - Multiple markers</title>
<style>
#map{
float: left; width: 100%; height: 400px;
}
.ol-tooltip *{
font-family: Arial, Helvetica, sans-serif;
font-weight: 300
}
.ol-tooltip {
display: flex; overflow: hidden;
padding: 3px; margin: 3px 0px;
border-radius: 6px;
}
.ol-tooltip:hover{
background: rgba(102, 51, 153, 0.062)
}
.ol-tooltip img {
float: left; padding: 5px;
width: 40px; height: 40px;
}
.ol-tooltip-job a{
font-size: 15px; padding: 2px;
text-decoration: none;
color: #0050b8;
font-weight: bold;
white-space: nowrap;
}
.ol-tooltip-job a:hover{
color: #c90083;
}
.ol-tooltip-salary{
font-size: 14px; padding: 2px;
white-space: nowrap;
}
.ol-tooltip-company{
font-size: 13px; padding: 2px;
}
.ol-popup {
position: absolute;
background-color: white;
filter: drop-shadow(0 1px 4px rgba(0,0,0,0.1));
padding: 10px;
border-radius: 10px;
border: 1px solid #cccccc2a;
bottom: 12px;
width: 210px;
transform: translate(-50%, 0%);
margin-bottom: 10px;
}
.ol-popup:after, .ol-popup:before {
top: 100%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
}
.ol-popup:after {
border-top-color: white;
border-width: 10px;
left: 120px;
margin-left: -16px;
}
.ol-popup:before {
border-top-color: #cccccc2a;
border-width: 11px;
left: 120px;
margin-left: -16px;
}
.marker{
background: #222 !important;
}
.animated {
position: relative;
-webkit-animation-duration: 1s;
animation-duration: 1s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
.animated:hover {
-webkit-animation-iteration-count: infinite;
animation-iteration-count: infinite;
}
@keyframes hop {
0% {margin-bottom: 0px;}
50% {margin-bottom: 30px;}
100% {margin-bottom: 0px;}
}
.hop {
-webkit-animation-name: hop;
animation-name: hop;
animation-iteration-count: infinite;
animation-duration: 2s;
}
</style>
<!-- OpenLayers map -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.3.1/css/ol.css" type="text/css">
<script src="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.3.1/build/ol.js"></script>
<!-- Enable map parts -->
<script defer src="ol-map-multiple-markers.js"></script>
</head>
<body>
<h1>OpenLayer - Multiple markers with popup</h1>
<div id="map"></div>
<!-- Popup hover -->
<div id="popup" class="ol-popup">
<a id="popup-closer" class="ol-popup-closer"></a>
<div id="popup-content"></div>
</div>
<!-- Popup click -->
<div id="popupClick" class="ol-popup">
<a id="popup-closer" class="ol-popup-closer"></a>
<div id="popup-content-click"></div>
</div>
</body>
</html>