-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathreact.html
More file actions
242 lines (208 loc) · 6.77 KB
/
Copy pathreact.html
File metadata and controls
242 lines (208 loc) · 6.77 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title> React JS </title>
<!-- Include the style sheet for the ThinkGeo VectorMap.js library from our CDN. -->
<link rel="stylesheet" href="https://cdn.thinkgeo.com/vectormap-js/3.0.0/vectormap.css">
<!-- Define some custom styles for the UI of our sample page. -->
<style rel="stylesheet" type="text/css">
#root,
#map {
height: 100%;
width: 100%;
}
.ol-control button {
height: 1.2em !important;
width: 1.2em !important;
border: solid 1px #ccc;
font-size: 1.5em !important;
background-color: #fff !important;
color: #2d3c4d;
cursor: pointer;
border-radius: 2px;
}
.ol-control button:focus {
outline: unset;
}
.ol-full-screen {
right: unset;
left: 0.5em;
top: 5.5em;
}
#mapWrap {
height: 100%;
width: 100%;
position: relative;
}
.controlPanel {
position: absolute;
right: 0;
top: 0;
background: #fff;
padding: 0.6rem;
box-shadow: 0 2px 4px rgba(0, 0, 0, .2), 0 -1px 0 rgba(0, 0, 0, .02);
z-index: 1000;
border-bottom-left-radius: 5px;
}
.controlPanel>div {
margin: 15px 0;
}
.controlPanel label {
display: inline-block;
width: 190px;
color: #5f6b78;
text-align: right;
padding-right: 5px;
}
.controlPanel input,
.controlPanel select {
padding: 3px 12px;
width: 143px;
line-height: 1.42857;
color: #555;
background-color: #fff;
background-image: none;
border: 1px solid #ccc;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
-webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
-o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}
.controlPanel select {
width: 169px;
}
.controlPanel input:focus,
.controlPanel select:focus {
border-color: #66afe9;
outline: 0;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6);
}
.controlPanel .refresh-btn {
width: 100%;
text-align: right;
margin: 0;
}
.controlPanel button {
display: inline-block;
padding: 6px 12px;
font-size: 14px;
font-weight: normal;
line-height: 1.428571429;
text-align: right;
white-space: nowrap;
vertical-align: middle;
cursor: pointer;
border: 1px solid #357ebd;
border-radius: 4px;
color: #fff;
background-color: #428bca;
}
.controlPanel button:focus {
outline: 0;
}
.controlPanel button:active {
-webkit-box-shadow: inset 0 5px 4px rgba(0, 0, 0, .075);
box-shadow: inset 0 5px 4px rgba(0, 0, 0, .075);
}
@media only screen and (max-device-width: 767px) {
.controlPanel label {
width: 190px;
display: block;
text-align: left;
margin-bottom: 3px;
}
.controlPanel>div {
margin: 9px 0;
}
}
#error-message {
position: absolute;
top: -150px;
left: 50%;
width: auto;
min-width: 300px;
margin-left: auto;
text-align: center;
transform: translate(-50%, 0);
transition: top 0.6s;
}
#error-message.show {
top: 15px;
transition: top 0.6s;
}
#error-message p {
line-height: 40px;
padding-left: 10px;
padding-right: 10px;
border-radius: 3px;
border-color: #f5c6cb;
background-color: #f8d7da;
color: #721c24;
}
#error-modal {
position: fixed;
top: 0;
height: 100%;
width: 100%;
z-index: 99;
background-color: #0000006e;
}
.modal-content {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 600px;
height: auto;
text-align: right;
padding: 10px;
border-radius: 5px;
font-size: 1.1rem;
line-height: 1.5;
background-color: #f0f0f0;
border: 1px solid #b8b8b8;
}
.modal-content p {
text-align: left;
}
.modal-content button {
color: #fff;
background-color: #3d3d3e;
border-color: #3d3d3e;
border-radius: 4px;
padding: 0 7px;
height: 30px;
width: 60px;
cursor: pointer;
margin-right: 20px;
}
.hide {
display: none;
}
@media (max-width: 767px) {
.modal-content {
width: 80vw;
}
}
</style>
</head>
<body>
<!-- This <div> is the container into which our map control component will be loaded. -->
<div id="root"></div>
<!-- Include the latest version of ThinkGeo's VectorMap.js library from our CDN. -->
<script src="https://cdn.thinkgeo.com/vectormap-js/3.0.0/vectormap.js"></script>
<!-- Include ThinkGeo's Map Icon Font loader for POI icons on the background layer. -->
<script src="https://cdn.thinkgeo.com/vectormap-icons/2.0.0/webfontloader.js"></script>
<!-- Load the React library dependency. -->
<script src="https://cdn.staticfile.org/react/16.4.0/umd/react.development.js"></script>
<script src="https://cdn.staticfile.org/react-dom/16.4.0/umd/react-dom.development.js"></script>
<script src="https://cdn.staticfile.org/babel-standalone/6.26.0/babel.min.js"></script>
<script src="../js/react.js" type="text/babel"></script>
</body>
</html>