@antv/l7-component 2.11.1 → 2.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/control/logo.js +1 -1
- package/es/css/index.css +21 -6
- package/es/css/popup.less +18 -6
- package/es/index.js +1 -1
- package/es/popup/layerPopup.d.ts +11 -4
- package/es/popup/layerPopup.js +58 -30
- package/es/popup/popup.d.ts +7 -15
- package/es/popup/popup.js +46 -55
- package/lib/control/logo.js +1 -1
- package/lib/css/index.css +21 -6
- package/lib/css/popup.less +18 -6
- package/lib/index.js +1 -1
- package/lib/popup/layerPopup.js +67 -31
- package/lib/popup/popup.js +50 -56
- package/package.json +5 -5
package/es/popup/popup.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
2
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
4
3
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
@@ -169,11 +168,6 @@ var Popup = /*#__PURE__*/function (_EventEmitter) {
|
|
|
169
168
|
* @protected
|
|
170
169
|
*/
|
|
171
170
|
|
|
172
|
-
/**
|
|
173
|
-
* popup 内容标题
|
|
174
|
-
* @protected
|
|
175
|
-
*/
|
|
176
|
-
|
|
177
171
|
/**
|
|
178
172
|
* 气泡箭头对应的 DOM
|
|
179
173
|
* @protected
|
|
@@ -215,7 +209,8 @@ var Popup = /*#__PURE__*/function (_EventEmitter) {
|
|
|
215
209
|
this.updateFollowCursor();
|
|
216
210
|
var _this$popupOption2 = this.popupOption,
|
|
217
211
|
html = _this$popupOption2.html,
|
|
218
|
-
text = _this$popupOption2.text
|
|
212
|
+
text = _this$popupOption2.text,
|
|
213
|
+
title = _this$popupOption2.title;
|
|
219
214
|
|
|
220
215
|
if (html) {
|
|
221
216
|
this.setHTML(html);
|
|
@@ -223,6 +218,10 @@ var Popup = /*#__PURE__*/function (_EventEmitter) {
|
|
|
223
218
|
this.setText(text);
|
|
224
219
|
}
|
|
225
220
|
|
|
221
|
+
if (title) {
|
|
222
|
+
this.setTitle(title);
|
|
223
|
+
}
|
|
224
|
+
|
|
226
225
|
this.emit('open');
|
|
227
226
|
return this;
|
|
228
227
|
} // 移除popup
|
|
@@ -270,15 +269,20 @@ var Popup = /*#__PURE__*/function (_EventEmitter) {
|
|
|
270
269
|
}, {
|
|
271
270
|
key: "setOptions",
|
|
272
271
|
value: function setOptions(option) {
|
|
272
|
+
this.show();
|
|
273
273
|
this.popupOption = _objectSpread(_objectSpread({}, this.popupOption), option);
|
|
274
274
|
|
|
275
|
-
if (this.checkUpdateOption(option, ['closeButton', 'closeButtonOffsets', 'maxWidth', 'anchor', 'stopPropagation', 'className', 'style', 'lngLat', 'offsets'
|
|
275
|
+
if (this.checkUpdateOption(option, ['closeButton', 'closeButtonOffsets', 'maxWidth', 'anchor', 'stopPropagation', 'className', 'style', 'lngLat', 'offsets'])) {
|
|
276
276
|
if (this.container) {
|
|
277
277
|
DOM.remove(this.container); // @ts-ignore
|
|
278
278
|
|
|
279
279
|
this.container = undefined;
|
|
280
280
|
}
|
|
281
281
|
|
|
282
|
+
if (this.popupOption.title) {
|
|
283
|
+
this.setTitle(this.popupOption.title);
|
|
284
|
+
}
|
|
285
|
+
|
|
282
286
|
if (this.popupOption.html) {
|
|
283
287
|
this.setHTML(this.popupOption.html);
|
|
284
288
|
} else if (this.popupOption.text) {
|
|
@@ -304,9 +308,12 @@ var Popup = /*#__PURE__*/function (_EventEmitter) {
|
|
|
304
308
|
this.setText(option.text);
|
|
305
309
|
}
|
|
306
310
|
|
|
311
|
+
if (this.checkUpdateOption(option, ['title'])) {
|
|
312
|
+
this.setTitle(option.title);
|
|
313
|
+
}
|
|
314
|
+
|
|
307
315
|
if (this.checkUpdateOption(option, ['lngLat']) && option.lngLat) {
|
|
308
316
|
this.setLnglat(option.lngLat);
|
|
309
|
-
this.show();
|
|
310
317
|
}
|
|
311
318
|
|
|
312
319
|
return this;
|
|
@@ -362,7 +369,7 @@ var Popup = /*#__PURE__*/function (_EventEmitter) {
|
|
|
362
369
|
key: "setHTML",
|
|
363
370
|
value: function setHTML(html) {
|
|
364
371
|
this.popupOption.html = html;
|
|
365
|
-
return this.setDOMContent(
|
|
372
|
+
return this.setDOMContent(html);
|
|
366
373
|
}
|
|
367
374
|
/**
|
|
368
375
|
* 设置 Popup 展示文本
|
|
@@ -375,6 +382,29 @@ var Popup = /*#__PURE__*/function (_EventEmitter) {
|
|
|
375
382
|
this.popupOption.text = text;
|
|
376
383
|
return this.setDOMContent(window.document.createTextNode(text));
|
|
377
384
|
}
|
|
385
|
+
}, {
|
|
386
|
+
key: "setTitle",
|
|
387
|
+
value: function setTitle(title) {
|
|
388
|
+
this.show();
|
|
389
|
+
|
|
390
|
+
if (title) {
|
|
391
|
+
if (!this.contentTitle) {
|
|
392
|
+
this.contentTitle = DOM.create('div', 'l7-popup-content__title');
|
|
393
|
+
|
|
394
|
+
if (this.content.firstChild) {
|
|
395
|
+
this.content.insertBefore(this.contentTitle, this.content.firstChild);
|
|
396
|
+
} else {
|
|
397
|
+
this.content.append(this.contentTitle);
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
DOM.clearChildren(this.contentTitle);
|
|
402
|
+
DOM.appendElementType(this.contentTitle, title);
|
|
403
|
+
} else if (this.contentTitle) {
|
|
404
|
+
DOM.remove(this.contentTitle);
|
|
405
|
+
this.contentTitle = undefined;
|
|
406
|
+
}
|
|
407
|
+
}
|
|
378
408
|
/**
|
|
379
409
|
* 将地图自动平移到气泡位置
|
|
380
410
|
*/
|
|
@@ -407,6 +437,7 @@ var Popup = /*#__PURE__*/function (_EventEmitter) {
|
|
|
407
437
|
value: function setLnglat(lngLat) {
|
|
408
438
|
var _this2 = this;
|
|
409
439
|
|
|
440
|
+
this.show();
|
|
410
441
|
this.lngLat = lngLat;
|
|
411
442
|
|
|
412
443
|
if (Array.isArray(lngLat)) {
|
|
@@ -480,14 +511,15 @@ var Popup = /*#__PURE__*/function (_EventEmitter) {
|
|
|
480
511
|
}
|
|
481
512
|
/**
|
|
482
513
|
* 设置 Popup 内容 HTML
|
|
483
|
-
* @param
|
|
514
|
+
* @param element
|
|
484
515
|
*/
|
|
485
516
|
|
|
486
517
|
}, {
|
|
487
518
|
key: "setDOMContent",
|
|
488
|
-
value: function setDOMContent(
|
|
519
|
+
value: function setDOMContent(element) {
|
|
520
|
+
this.show();
|
|
489
521
|
this.createContent();
|
|
490
|
-
this.contentPanel
|
|
522
|
+
DOM.appendElementType(this.contentPanel, element);
|
|
491
523
|
this.update();
|
|
492
524
|
return this;
|
|
493
525
|
}
|
|
@@ -551,17 +583,9 @@ var Popup = /*#__PURE__*/function (_EventEmitter) {
|
|
|
551
583
|
DOM.remove(this.content);
|
|
552
584
|
}
|
|
553
585
|
|
|
586
|
+
this.contentTitle = undefined;
|
|
554
587
|
this.content = DOM.create('div', 'l7-popup-content', this.container);
|
|
555
588
|
|
|
556
|
-
if (this.popupOption.title) {
|
|
557
|
-
var _this$contentTitle;
|
|
558
|
-
|
|
559
|
-
this.contentTitle = DOM.create('div', 'l7-popup-content__title', this.content);
|
|
560
|
-
(_this$contentTitle = this.contentTitle) === null || _this$contentTitle === void 0 ? void 0 : _this$contentTitle.append(this.getPopupHTMLFragment(this.popupOption.title));
|
|
561
|
-
} else {
|
|
562
|
-
this.contentTitle = undefined;
|
|
563
|
-
}
|
|
564
|
-
|
|
565
589
|
if (this.popupOption.closeButton) {
|
|
566
590
|
var closeButton = createL7Icon('l7-icon-guanbi');
|
|
567
591
|
DOM.addClass(closeButton, 'l7-popup-close-button');
|
|
@@ -615,39 +639,6 @@ var Popup = /*#__PURE__*/function (_EventEmitter) {
|
|
|
615
639
|
return key in option;
|
|
616
640
|
});
|
|
617
641
|
}
|
|
618
|
-
/**
|
|
619
|
-
* 根据参数 HTML 片段返回对应的 Fragment
|
|
620
|
-
* @param html
|
|
621
|
-
* @protected
|
|
622
|
-
*/
|
|
623
|
-
|
|
624
|
-
}, {
|
|
625
|
-
key: "getPopupHTMLFragment",
|
|
626
|
-
value: function getPopupHTMLFragment(html) {
|
|
627
|
-
var frag = window.document.createDocumentFragment();
|
|
628
|
-
var temp = window.document.createElement('body');
|
|
629
|
-
var child;
|
|
630
|
-
|
|
631
|
-
if (typeof html === 'string') {
|
|
632
|
-
temp.innerHTML = html;
|
|
633
|
-
} else if (Array.isArray(html)) {
|
|
634
|
-
temp.append.apply(temp, _toConsumableArray(html));
|
|
635
|
-
} else if (html instanceof HTMLElement) {
|
|
636
|
-
temp.append(html);
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
while (true) {
|
|
640
|
-
child = temp.firstChild;
|
|
641
|
-
|
|
642
|
-
if (!child) {
|
|
643
|
-
break;
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
frag.appendChild(child);
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
return frag;
|
|
650
|
-
}
|
|
651
642
|
}]);
|
|
652
643
|
|
|
653
644
|
return Popup;
|
package/lib/control/logo.js
CHANGED
|
@@ -43,7 +43,7 @@ var Logo = /*#__PURE__*/function (_Control) {
|
|
|
43
43
|
return {
|
|
44
44
|
position: _baseControl.PositionType.BOTTOMLEFT,
|
|
45
45
|
name: 'logo',
|
|
46
|
-
href: 'https://l7.antv.
|
|
46
|
+
href: 'https://l7.antv.antgroup.com/',
|
|
47
47
|
img: 'https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*GRb1TKp4HcMAAAAAAAAAAAAAARQnAQ'
|
|
48
48
|
};
|
|
49
49
|
}
|
package/lib/css/index.css
CHANGED
|
@@ -422,7 +422,6 @@
|
|
|
422
422
|
z-index: 5;
|
|
423
423
|
display: -webkit-flex;
|
|
424
424
|
display: flex;
|
|
425
|
-
pointer-events: none;
|
|
426
425
|
will-change: transform;
|
|
427
426
|
}
|
|
428
427
|
.l7-popup.l7-popup-hide {
|
|
@@ -431,15 +430,18 @@
|
|
|
431
430
|
.l7-popup .l7-popup-content {
|
|
432
431
|
position: relative;
|
|
433
432
|
padding: 16px;
|
|
433
|
+
font-size: 14px;
|
|
434
434
|
background: #fff;
|
|
435
435
|
border-radius: 3px;
|
|
436
436
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
|
437
|
-
pointer-events: auto;
|
|
438
|
-
font-size: 14px;
|
|
439
437
|
}
|
|
440
438
|
.l7-popup .l7-popup-content .l7-popup-content__title {
|
|
441
|
-
font-weight: bold;
|
|
442
439
|
margin-bottom: 8px;
|
|
440
|
+
font-weight: bold;
|
|
441
|
+
}
|
|
442
|
+
.l7-popup .l7-popup-content .l7-popup-content__title,
|
|
443
|
+
.l7-popup .l7-popup-content .l7-popup-content__panel {
|
|
444
|
+
white-space: break-spaces;
|
|
443
445
|
}
|
|
444
446
|
.l7-popup .l7-popup-content .l7-popup-close-button {
|
|
445
447
|
position: absolute;
|
|
@@ -447,16 +449,17 @@
|
|
|
447
449
|
right: 0;
|
|
448
450
|
width: 18px;
|
|
449
451
|
height: 18px;
|
|
452
|
+
padding: 0;
|
|
453
|
+
font-size: 14px;
|
|
450
454
|
line-height: 18px;
|
|
451
455
|
text-align: center;
|
|
452
|
-
padding: 0;
|
|
453
456
|
background-color: transparent;
|
|
454
457
|
border: 0;
|
|
455
458
|
border-radius: 0 3px 0 0;
|
|
456
459
|
cursor: pointer;
|
|
457
|
-
font-size: 14px;
|
|
458
460
|
}
|
|
459
461
|
.l7-popup .l7-popup-tip {
|
|
462
|
+
position: relative;
|
|
460
463
|
z-index: 1;
|
|
461
464
|
width: 0;
|
|
462
465
|
height: 0;
|
|
@@ -468,12 +471,22 @@
|
|
|
468
471
|
-webkit-flex-direction: column-reverse;
|
|
469
472
|
flex-direction: column-reverse;
|
|
470
473
|
}
|
|
474
|
+
.l7-popup.l7-popup-anchor-bottom .l7-popup-tip,
|
|
475
|
+
.l7-popup.l7-popup-anchor-bottom-left .l7-popup-tip,
|
|
476
|
+
.l7-popup.l7-popup-anchor-bottom-right .l7-popup-tip {
|
|
477
|
+
bottom: 1px;
|
|
478
|
+
}
|
|
471
479
|
.l7-popup.l7-popup-anchor-top,
|
|
472
480
|
.l7-popup.l7-popup-anchor-top-left,
|
|
473
481
|
.l7-popup.l7-popup-anchor-top-right {
|
|
474
482
|
-webkit-flex-direction: column;
|
|
475
483
|
flex-direction: column;
|
|
476
484
|
}
|
|
485
|
+
.l7-popup.l7-popup-anchor-top .l7-popup-tip,
|
|
486
|
+
.l7-popup.l7-popup-anchor-top-left .l7-popup-tip,
|
|
487
|
+
.l7-popup.l7-popup-anchor-top-right .l7-popup-tip {
|
|
488
|
+
top: 1px;
|
|
489
|
+
}
|
|
477
490
|
.l7-popup.l7-popup-anchor-left {
|
|
478
491
|
-webkit-flex-direction: row;
|
|
479
492
|
flex-direction: row;
|
|
@@ -483,6 +496,7 @@
|
|
|
483
496
|
flex-direction: row-reverse;
|
|
484
497
|
}
|
|
485
498
|
.l7-popup-anchor-top .l7-popup-tip {
|
|
499
|
+
position: relative;
|
|
486
500
|
-webkit-align-self: center;
|
|
487
501
|
align-self: center;
|
|
488
502
|
border-top: none;
|
|
@@ -529,6 +543,7 @@
|
|
|
529
543
|
border-left: none;
|
|
530
544
|
}
|
|
531
545
|
.l7-popup-anchor-right .l7-popup-tip {
|
|
546
|
+
right: 1px;
|
|
532
547
|
-webkit-align-self: center;
|
|
533
548
|
align-self: center;
|
|
534
549
|
border-right: none;
|
package/lib/css/popup.less
CHANGED
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
z-index: 5;
|
|
8
8
|
display: -webkit-flex;
|
|
9
9
|
display: flex;
|
|
10
|
-
pointer-events: none;
|
|
11
10
|
will-change: transform;
|
|
12
11
|
&.l7-popup-hide {
|
|
13
12
|
display: none;
|
|
@@ -16,15 +15,19 @@
|
|
|
16
15
|
.l7-popup-content {
|
|
17
16
|
position: relative;
|
|
18
17
|
padding: 16px;
|
|
18
|
+
font-size: 14px;
|
|
19
19
|
background: #fff;
|
|
20
20
|
border-radius: 3px;
|
|
21
21
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
|
22
|
-
pointer-events: auto;
|
|
23
|
-
font-size: 14px;
|
|
24
22
|
|
|
25
23
|
.l7-popup-content__title {
|
|
26
|
-
font-weight: bold;
|
|
27
24
|
margin-bottom: 8px;
|
|
25
|
+
font-weight: bold;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.l7-popup-content__title,
|
|
29
|
+
.l7-popup-content__panel {
|
|
30
|
+
white-space: break-spaces;
|
|
28
31
|
}
|
|
29
32
|
|
|
30
33
|
.l7-popup-close-button {
|
|
@@ -33,18 +36,19 @@
|
|
|
33
36
|
right: 0;
|
|
34
37
|
width: 18px;
|
|
35
38
|
height: 18px;
|
|
39
|
+
padding: 0;
|
|
40
|
+
font-size: 14px;
|
|
36
41
|
line-height: 18px;
|
|
37
42
|
text-align: center;
|
|
38
|
-
padding: 0;
|
|
39
43
|
background-color: transparent;
|
|
40
44
|
border: 0;
|
|
41
45
|
border-radius: 0 3px 0 0;
|
|
42
46
|
cursor: pointer;
|
|
43
|
-
font-size: 14px;
|
|
44
47
|
}
|
|
45
48
|
}
|
|
46
49
|
|
|
47
50
|
.l7-popup-tip {
|
|
51
|
+
position: relative;
|
|
48
52
|
z-index: 1;
|
|
49
53
|
width: 0;
|
|
50
54
|
height: 0;
|
|
@@ -56,6 +60,9 @@
|
|
|
56
60
|
&.l7-popup-anchor-bottom-right {
|
|
57
61
|
-webkit-flex-direction: column-reverse;
|
|
58
62
|
flex-direction: column-reverse;
|
|
63
|
+
.l7-popup-tip {
|
|
64
|
+
bottom: 1px;
|
|
65
|
+
}
|
|
59
66
|
}
|
|
60
67
|
|
|
61
68
|
&.l7-popup-anchor-top,
|
|
@@ -63,6 +70,9 @@
|
|
|
63
70
|
&.l7-popup-anchor-top-right {
|
|
64
71
|
-webkit-flex-direction: column;
|
|
65
72
|
flex-direction: column;
|
|
73
|
+
.l7-popup-tip {
|
|
74
|
+
top: 1px;
|
|
75
|
+
}
|
|
66
76
|
}
|
|
67
77
|
|
|
68
78
|
&.l7-popup-anchor-left {
|
|
@@ -77,6 +87,7 @@
|
|
|
77
87
|
}
|
|
78
88
|
|
|
79
89
|
.l7-popup-anchor-top .l7-popup-tip {
|
|
90
|
+
position: relative;
|
|
80
91
|
-webkit-align-self: center;
|
|
81
92
|
align-self: center;
|
|
82
93
|
border-top: none;
|
|
@@ -130,6 +141,7 @@
|
|
|
130
141
|
}
|
|
131
142
|
|
|
132
143
|
.l7-popup-anchor-right .l7-popup-tip {
|
|
144
|
+
right: 1px;
|
|
133
145
|
-webkit-align-self: center;
|
|
134
146
|
align-self: center;
|
|
135
147
|
border-right: none;
|
package/lib/index.js
CHANGED
|
@@ -251,4 +251,4 @@ function loadStyles(css, doc) {
|
|
|
251
251
|
return style;
|
|
252
252
|
}
|
|
253
253
|
|
|
254
|
-
loadStyles(".l7-marker-container {\n position: absolute;\n width: 100%;\n height: 100%;\n overflow: hidden;\n}\n.l7-marker {\n position: absolute !important;\n top: 0;\n left: 0;\n z-index: 5;\n cursor: pointer;\n}\n.l7-marker-cluster {\n width: 40px;\n height: 40px;\n background-color: rgba(181, 226, 140, 0.6);\n background-clip: padding-box;\n border-radius: 20px;\n}\n.l7-marker-cluster div {\n width: 30px;\n height: 30px;\n margin-top: 5px;\n margin-left: 5px;\n font: 12px 'Helvetica Neue', Arial, Helvetica, sans-serif;\n text-align: center;\n background-color: rgba(110, 204, 57, 0.6);\n border-radius: 15px;\n}\n.l7-marker-cluster span {\n line-height: 30px;\n}\n.l7-touch .l7-control-attribution,\n.l7-touch .l7-control-layers,\n.l7-touch .l7-bar {\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.l7-touch .l7-control-layers,\n.l7-touch .l7-bar {\n background-clip: padding-box;\n border: 2px solid rgba(0, 0, 0, 0.2);\n}\n.mapboxgl-ctrl-logo,\n.amap-logo {\n display: none !important;\n}\n.l7-select-box {\n border: 3px dashed gray;\n border-radius: 2px;\n position: absolute;\n z-index: 1000;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.l7-control-container {\n font: 12px/1.5 'Helvetica Neue', Arial, Helvetica, sans-serif;\n}\n.l7-control-container .l7-control {\n position: relative;\n z-index: 800;\n float: left;\n clear: both;\n color: #595959;\n font-size: 12px;\n pointer-events: visiblePainted;\n /* IE 9-10 doesn't have auto */\n pointer-events: auto;\n}\n.l7-control-container .l7-control.l7-control--hide {\n display: none;\n}\n.l7-control-container .l7-top {\n top: 0;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n position: absolute;\n z-index: 1000;\n pointer-events: none;\n}\n.l7-control-container .l7-top .l7-control:not(.l7-control--hide) {\n margin-top: 8px;\n}\n.l7-control-container .l7-right {\n right: 0;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n position: absolute;\n z-index: 1000;\n pointer-events: none;\n}\n.l7-control-container .l7-right .l7-control:not(.l7-control--hide) {\n margin-right: 8px;\n}\n.l7-control-container .l7-bottom {\n bottom: 0;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n position: absolute;\n z-index: 1000;\n pointer-events: none;\n}\n.l7-control-container .l7-bottom .l7-control:not(.l7-control--hide) {\n margin-bottom: 8px;\n}\n.l7-control-container .l7-left {\n left: 0;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n position: absolute;\n z-index: 1000;\n pointer-events: none;\n}\n.l7-control-container .l7-left .l7-control:not(.l7-control--hide) {\n margin-left: 8px;\n}\n.l7-control-container .l7-center {\n position: absolute;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.l7-control-container .l7-center.l7-top,\n.l7-control-container .l7-center.l7-bottom {\n width: 100%;\n}\n.l7-control-container .l7-center.l7-left,\n.l7-control-container .l7-center.l7-right {\n height: 100%;\n}\n.l7-control-container .l7-center .l7-control {\n margin-right: 8px;\n margin-bottom: 8px;\n}\n.l7-control-container .l7-row {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n}\n.l7-control-container .l7-row.l7-top {\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n}\n.l7-control-container .l7-row.l7-bottom {\n -webkit-box-align: end;\n -ms-flex-align: end;\n align-items: flex-end;\n}\n.l7-control-container .l7-column {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.l7-control-container .l7-column.l7-left {\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n}\n.l7-control-container .l7-column.l7-right {\n -webkit-box-align: end;\n -ms-flex-align: end;\n align-items: flex-end;\n}\n.l7-button-control {\n min-width: 28px;\n height: 28px;\n background-color: #fff;\n border-width: 0;\n border-radius: 2px;\n outline: 0;\n cursor: pointer;\n -webkit-transition: all 0.2s;\n transition: all 0.2s;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n padding: 0 6px;\n -webkit-box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);\n box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);\n line-height: 16px;\n}\n.l7-button-control .l7-iconfont {\n fill: #595959;\n color: #595959;\n width: 16px;\n height: 16px;\n}\n.l7-button-control.l7-button-control--row {\n padding: 0 16px 0 13px;\n}\n.l7-button-control.l7-button-control--row * + .l7-button-control__text {\n margin-left: 8px;\n}\n.l7-button-control.l7-button-control--column {\n height: 44px;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.l7-button-control.l7-button-control--column .l7-iconfont {\n margin-top: 3px;\n}\n.l7-button-control.l7-button-control--column .l7-button-control__text {\n margin-top: 3px;\n font-size: 10px;\n -webkit-transform: scale(0.83333);\n transform: scale(0.83333);\n}\n.l7-button-control:not(:disabled):hover {\n background-color: #f3f3f3;\n}\n.l7-button-control:not(:disabled):active {\n background-color: #f3f3f3;\n}\n.l7-button-control:disabled {\n background-color: #fafafa;\n color: #bdbdbd;\n cursor: not-allowed;\n}\n.l7-button-control:disabled .l7-iconfont {\n fill: #bdbdbd;\n color: #bdbdbd;\n}\n.l7-button-control:disabled:hover {\n background-color: #fafafa;\n}\n.l7-button-control:disabled:active {\n background-color: #fafafa;\n}\n.l7-popper {\n position: absolute;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n z-index: 5;\n color: #595959;\n}\n.l7-popper.l7-popper-hide {\n display: none;\n}\n.l7-popper .l7-popper-content {\n min-height: 28px;\n background: #fff;\n border-radius: 2px;\n -webkit-box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);\n box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);\n}\n.l7-popper .l7-popper-arrow {\n width: 0;\n height: 0;\n border-width: 4px;\n border-style: solid;\n border-top-color: transparent;\n border-bottom-color: transparent;\n border-left-color: transparent;\n border-right-color: transparent;\n -webkit-box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);\n box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);\n}\n.l7-popper.l7-popper-left {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n}\n.l7-popper.l7-popper-left .l7-popper-arrow {\n border-left-color: #fff;\n margin: 10px 0;\n}\n.l7-popper.l7-popper-right {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: reverse;\n -ms-flex-direction: row-reverse;\n flex-direction: row-reverse;\n}\n.l7-popper.l7-popper-right .l7-popper-arrow {\n border-right-color: #fff;\n margin: 10px 0;\n}\n.l7-popper.l7-popper-top {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.l7-popper.l7-popper-top .l7-popper-arrow {\n border-top-color: #fff;\n margin: 0 10px;\n}\n.l7-popper.l7-popper-bottom {\n -webkit-box-orient: vertical;\n -webkit-box-direction: reverse;\n -ms-flex-direction: column-reverse;\n flex-direction: column-reverse;\n}\n.l7-popper.l7-popper-bottom .l7-popper-arrow {\n border-bottom-color: #fff;\n margin: 0 10px;\n}\n.l7-popper.l7-popper-start {\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n}\n.l7-popper.l7-popper-end {\n -webkit-box-align: end;\n -ms-flex-align: end;\n align-items: flex-end;\n}\n.l7-select-control--normal {\n padding: 4px 0;\n}\n.l7-select-control--normal .l7-select-control-item {\n height: 24px;\n line-height: 24px;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n padding: 0 16px;\n font-size: 12px;\n}\n.l7-select-control--normal .l7-select-control-item > * + * {\n margin-left: 6px;\n}\n.l7-select-control--normal .l7-select-control-item input[type='checkbox'] {\n height: 14px;\n width: 14px;\n}\n.l7-select-control--normal .l7-select-control-item:hover {\n background-color: #f3f3f3;\n}\n.l7-select-control--image {\n padding: 12px 12px 0 12px;\n width: 474px;\n height: 320px;\n overflow: auto;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n}\n.l7-select-control--image .l7-select-control-item {\n margin-right: 12px;\n border-radius: 2px;\n overflow: hidden;\n border: 1px solid #fff;\n -webkit-box-sizing: content-box;\n box-sizing: content-box;\n width: calc((100% - 36px) / 3);\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n margin-bottom: 12px;\n position: relative;\n font-size: 12px;\n}\n.l7-select-control--image .l7-select-control-item img {\n width: 142px;\n height: 80px;\n}\n.l7-select-control--image .l7-select-control-item input[type='checkbox'] {\n position: absolute;\n right: 0;\n top: 0;\n}\n.l7-select-control--image .l7-select-control-item .l7-select-control-item-row {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n line-height: 26px;\n}\n.l7-select-control--image .l7-select-control-item .l7-select-control-item-row > * + * {\n margin-left: 8px;\n}\n.l7-select-control--image .l7-select-control-item.l7-select-control-item-active {\n border-color: #0370fe;\n}\n.l7-select-control--image .l7-select-control-item:nth-child(3n) {\n margin-right: 0;\n}\n.l7-select-control-item {\n cursor: pointer;\n}\n.l7-select-control-item input[type='checkbox'] {\n margin: 0;\n cursor: pointer;\n}\n.l7-select-control--multiple .l7-select-control-item:hover {\n background-color: transparent;\n}\n.l7-control-logo {\n width: 89px;\n height: 16px;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.l7-control-logo img {\n height: 100%;\n width: 100%;\n}\n.l7-control-logo .l7-control-logo-link {\n display: block;\n cursor: pointer;\n}\n.l7-control-logo .l7-control-logo-link img {\n cursor: pointer;\n}\n.l7-control-mouse-location {\n background-color: #fff;\n border-radius: 2px;\n -webkit-box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);\n box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);\n padding: 2px 4px;\n min-width: 130px;\n}\n.l7-control-zoom {\n -webkit-box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);\n box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);\n border-radius: 2px;\n overflow: hidden;\n}\n.l7-control-zoom .l7-button-control {\n -webkit-box-shadow: 0 0 0;\n box-shadow: 0 0 0;\n border-radius: 0;\n font-size: 16px;\n}\n.l7-control-zoom .l7-button-control .l7-iconfont {\n width: 14px;\n height: 14px;\n}\n.l7-control-zoom .l7-button-control:first-child {\n border-bottom: 1px solid #f0f0f0;\n}\n.l7-control-scale {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.l7-control-scale .l7-control-scale-line {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n padding: 2px 5px 1px;\n overflow: hidden;\n color: #595959;\n font-size: 10px;\n line-height: 1.1;\n white-space: nowrap;\n background: #fff;\n border: 2px solid #000;\n border-top: 0;\n -webkit-transition: width 0.1s;\n transition: width 0.1s;\n}\n.l7-control-scale .l7-control-scale-line + .l7-control-scale .l7-control-scale-line {\n margin-top: -2px;\n border-top: 2px solid #777;\n border-bottom: none;\n}\n.l7-right .l7-control-scale {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: end;\n -ms-flex-align: end;\n align-items: flex-end;\n}\n.l7-right .l7-control-scale .l7-control-scale-line {\n text-align: right;\n}\n.l7-popup {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 5;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n pointer-events: none;\n will-change: transform;\n}\n.l7-popup.l7-popup-hide {\n display: none;\n}\n.l7-popup .l7-popup-content {\n position: relative;\n padding: 16px;\n background: #fff;\n border-radius: 3px;\n -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);\n pointer-events: auto;\n font-size: 14px;\n}\n.l7-popup .l7-popup-content .l7-popup-content__title {\n font-weight: bold;\n margin-bottom: 8px;\n}\n.l7-popup .l7-popup-content .l7-popup-close-button {\n position: absolute;\n top: 0;\n right: 0;\n width: 18px;\n height: 18px;\n line-height: 18px;\n text-align: center;\n padding: 0;\n background-color: transparent;\n border: 0;\n border-radius: 0 3px 0 0;\n cursor: pointer;\n font-size: 14px;\n}\n.l7-popup .l7-popup-tip {\n z-index: 1;\n width: 0;\n height: 0;\n border: 10px solid transparent;\n}\n.l7-popup.l7-popup-anchor-bottom,\n.l7-popup.l7-popup-anchor-bottom-left,\n.l7-popup.l7-popup-anchor-bottom-right {\n -webkit-box-orient: vertical;\n -webkit-box-direction: reverse;\n -ms-flex-direction: column-reverse;\n flex-direction: column-reverse;\n}\n.l7-popup.l7-popup-anchor-top,\n.l7-popup.l7-popup-anchor-top-left,\n.l7-popup.l7-popup-anchor-top-right {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.l7-popup.l7-popup-anchor-left {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n}\n.l7-popup.l7-popup-anchor-right {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: reverse;\n -ms-flex-direction: row-reverse;\n flex-direction: row-reverse;\n}\n.l7-popup-anchor-top .l7-popup-tip {\n -webkit-align-self: center;\n -ms-flex-item-align: center;\n align-self: center;\n border-top: none;\n border-bottom-color: #fff;\n}\n.l7-popup-anchor-top-left .l7-popup-tip {\n -webkit-align-self: flex-start;\n -ms-flex-item-align: start;\n align-self: flex-start;\n border-top: none;\n border-bottom-color: #fff;\n border-left: none;\n}\n.l7-popup-anchor-top-right .l7-popup-tip {\n -webkit-align-self: flex-end;\n -ms-flex-item-align: end;\n align-self: flex-end;\n border-top: none;\n border-right: none;\n border-bottom-color: #fff;\n}\n.l7-popup-anchor-bottom .l7-popup-tip {\n -webkit-align-self: center;\n -ms-flex-item-align: center;\n align-self: center;\n border-top-color: #fff;\n border-bottom: none;\n}\n.l7-popup-anchor-bottom-left .l7-popup-tip {\n -webkit-align-self: flex-start;\n -ms-flex-item-align: start;\n align-self: flex-start;\n border-top-color: #fff;\n border-bottom: none;\n border-left: none;\n}\n.l7-popup-anchor-bottom-right .l7-popup-tip {\n -webkit-align-self: flex-end;\n -ms-flex-item-align: end;\n align-self: flex-end;\n border-top-color: #fff;\n border-right: none;\n border-bottom: none;\n}\n.l7-popup-anchor-left .l7-popup-tip {\n -webkit-align-self: center;\n -ms-flex-item-align: center;\n align-self: center;\n border-right-color: #fff;\n border-left: none;\n}\n.l7-popup-anchor-right .l7-popup-tip {\n -webkit-align-self: center;\n -ms-flex-item-align: center;\n align-self: center;\n border-right: none;\n border-left-color: #fff;\n}\n.l7-popup-anchor-top-left .l7-popup-content {\n border-top-left-radius: 0;\n}\n.l7-popup-anchor-top-right .l7-popup-content {\n border-top-right-radius: 0;\n}\n.l7-popup-anchor-bottom-left .l7-popup-content {\n border-bottom-left-radius: 0;\n}\n.l7-popup-anchor-bottom-right .l7-popup-content {\n border-bottom-right-radius: 0;\n}\n.l7-popup-track-pointer {\n display: none;\n}\n.l7-popup-track-pointer * {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n pointer-events: none;\n}\n.l7-map:hover .l7-popup-track-pointer {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.l7-map:active .l7-popup-track-pointer {\n display: none;\n}\n.l7-layer-popup__row {\n font-size: 12px;\n}\n.l7-layer-popup__row + .l7-layer-popup__row {\n margin-top: 4px;\n}\n");
|
|
254
|
+
loadStyles(".l7-marker-container {\n position: absolute;\n width: 100%;\n height: 100%;\n overflow: hidden;\n}\n.l7-marker {\n position: absolute !important;\n top: 0;\n left: 0;\n z-index: 5;\n cursor: pointer;\n}\n.l7-marker-cluster {\n width: 40px;\n height: 40px;\n background-color: rgba(181, 226, 140, 0.6);\n background-clip: padding-box;\n border-radius: 20px;\n}\n.l7-marker-cluster div {\n width: 30px;\n height: 30px;\n margin-top: 5px;\n margin-left: 5px;\n font: 12px 'Helvetica Neue', Arial, Helvetica, sans-serif;\n text-align: center;\n background-color: rgba(110, 204, 57, 0.6);\n border-radius: 15px;\n}\n.l7-marker-cluster span {\n line-height: 30px;\n}\n.l7-touch .l7-control-attribution,\n.l7-touch .l7-control-layers,\n.l7-touch .l7-bar {\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.l7-touch .l7-control-layers,\n.l7-touch .l7-bar {\n background-clip: padding-box;\n border: 2px solid rgba(0, 0, 0, 0.2);\n}\n.mapboxgl-ctrl-logo,\n.amap-logo {\n display: none !important;\n}\n.l7-select-box {\n border: 3px dashed gray;\n border-radius: 2px;\n position: absolute;\n z-index: 1000;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.l7-control-container {\n font: 12px/1.5 'Helvetica Neue', Arial, Helvetica, sans-serif;\n}\n.l7-control-container .l7-control {\n position: relative;\n z-index: 800;\n float: left;\n clear: both;\n color: #595959;\n font-size: 12px;\n pointer-events: visiblePainted;\n /* IE 9-10 doesn't have auto */\n pointer-events: auto;\n}\n.l7-control-container .l7-control.l7-control--hide {\n display: none;\n}\n.l7-control-container .l7-top {\n top: 0;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n position: absolute;\n z-index: 1000;\n pointer-events: none;\n}\n.l7-control-container .l7-top .l7-control:not(.l7-control--hide) {\n margin-top: 8px;\n}\n.l7-control-container .l7-right {\n right: 0;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n position: absolute;\n z-index: 1000;\n pointer-events: none;\n}\n.l7-control-container .l7-right .l7-control:not(.l7-control--hide) {\n margin-right: 8px;\n}\n.l7-control-container .l7-bottom {\n bottom: 0;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n position: absolute;\n z-index: 1000;\n pointer-events: none;\n}\n.l7-control-container .l7-bottom .l7-control:not(.l7-control--hide) {\n margin-bottom: 8px;\n}\n.l7-control-container .l7-left {\n left: 0;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n position: absolute;\n z-index: 1000;\n pointer-events: none;\n}\n.l7-control-container .l7-left .l7-control:not(.l7-control--hide) {\n margin-left: 8px;\n}\n.l7-control-container .l7-center {\n position: absolute;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.l7-control-container .l7-center.l7-top,\n.l7-control-container .l7-center.l7-bottom {\n width: 100%;\n}\n.l7-control-container .l7-center.l7-left,\n.l7-control-container .l7-center.l7-right {\n height: 100%;\n}\n.l7-control-container .l7-center .l7-control {\n margin-right: 8px;\n margin-bottom: 8px;\n}\n.l7-control-container .l7-row {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n}\n.l7-control-container .l7-row.l7-top {\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n}\n.l7-control-container .l7-row.l7-bottom {\n -webkit-box-align: end;\n -ms-flex-align: end;\n align-items: flex-end;\n}\n.l7-control-container .l7-column {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.l7-control-container .l7-column.l7-left {\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n}\n.l7-control-container .l7-column.l7-right {\n -webkit-box-align: end;\n -ms-flex-align: end;\n align-items: flex-end;\n}\n.l7-button-control {\n min-width: 28px;\n height: 28px;\n background-color: #fff;\n border-width: 0;\n border-radius: 2px;\n outline: 0;\n cursor: pointer;\n -webkit-transition: all 0.2s;\n transition: all 0.2s;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n padding: 0 6px;\n -webkit-box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);\n box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);\n line-height: 16px;\n}\n.l7-button-control .l7-iconfont {\n fill: #595959;\n color: #595959;\n width: 16px;\n height: 16px;\n}\n.l7-button-control.l7-button-control--row {\n padding: 0 16px 0 13px;\n}\n.l7-button-control.l7-button-control--row * + .l7-button-control__text {\n margin-left: 8px;\n}\n.l7-button-control.l7-button-control--column {\n height: 44px;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.l7-button-control.l7-button-control--column .l7-iconfont {\n margin-top: 3px;\n}\n.l7-button-control.l7-button-control--column .l7-button-control__text {\n margin-top: 3px;\n font-size: 10px;\n -webkit-transform: scale(0.83333);\n transform: scale(0.83333);\n}\n.l7-button-control:not(:disabled):hover {\n background-color: #f3f3f3;\n}\n.l7-button-control:not(:disabled):active {\n background-color: #f3f3f3;\n}\n.l7-button-control:disabled {\n background-color: #fafafa;\n color: #bdbdbd;\n cursor: not-allowed;\n}\n.l7-button-control:disabled .l7-iconfont {\n fill: #bdbdbd;\n color: #bdbdbd;\n}\n.l7-button-control:disabled:hover {\n background-color: #fafafa;\n}\n.l7-button-control:disabled:active {\n background-color: #fafafa;\n}\n.l7-popper {\n position: absolute;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n z-index: 5;\n color: #595959;\n}\n.l7-popper.l7-popper-hide {\n display: none;\n}\n.l7-popper .l7-popper-content {\n min-height: 28px;\n background: #fff;\n border-radius: 2px;\n -webkit-box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);\n box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);\n}\n.l7-popper .l7-popper-arrow {\n width: 0;\n height: 0;\n border-width: 4px;\n border-style: solid;\n border-top-color: transparent;\n border-bottom-color: transparent;\n border-left-color: transparent;\n border-right-color: transparent;\n -webkit-box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);\n box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);\n}\n.l7-popper.l7-popper-left {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n}\n.l7-popper.l7-popper-left .l7-popper-arrow {\n border-left-color: #fff;\n margin: 10px 0;\n}\n.l7-popper.l7-popper-right {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: reverse;\n -ms-flex-direction: row-reverse;\n flex-direction: row-reverse;\n}\n.l7-popper.l7-popper-right .l7-popper-arrow {\n border-right-color: #fff;\n margin: 10px 0;\n}\n.l7-popper.l7-popper-top {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.l7-popper.l7-popper-top .l7-popper-arrow {\n border-top-color: #fff;\n margin: 0 10px;\n}\n.l7-popper.l7-popper-bottom {\n -webkit-box-orient: vertical;\n -webkit-box-direction: reverse;\n -ms-flex-direction: column-reverse;\n flex-direction: column-reverse;\n}\n.l7-popper.l7-popper-bottom .l7-popper-arrow {\n border-bottom-color: #fff;\n margin: 0 10px;\n}\n.l7-popper.l7-popper-start {\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n}\n.l7-popper.l7-popper-end {\n -webkit-box-align: end;\n -ms-flex-align: end;\n align-items: flex-end;\n}\n.l7-select-control--normal {\n padding: 4px 0;\n}\n.l7-select-control--normal .l7-select-control-item {\n height: 24px;\n line-height: 24px;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n padding: 0 16px;\n font-size: 12px;\n}\n.l7-select-control--normal .l7-select-control-item > * + * {\n margin-left: 6px;\n}\n.l7-select-control--normal .l7-select-control-item input[type='checkbox'] {\n height: 14px;\n width: 14px;\n}\n.l7-select-control--normal .l7-select-control-item:hover {\n background-color: #f3f3f3;\n}\n.l7-select-control--image {\n padding: 12px 12px 0 12px;\n width: 474px;\n height: 320px;\n overflow: auto;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n}\n.l7-select-control--image .l7-select-control-item {\n margin-right: 12px;\n border-radius: 2px;\n overflow: hidden;\n border: 1px solid #fff;\n -webkit-box-sizing: content-box;\n box-sizing: content-box;\n width: calc((100% - 36px) / 3);\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n margin-bottom: 12px;\n position: relative;\n font-size: 12px;\n}\n.l7-select-control--image .l7-select-control-item img {\n width: 142px;\n height: 80px;\n}\n.l7-select-control--image .l7-select-control-item input[type='checkbox'] {\n position: absolute;\n right: 0;\n top: 0;\n}\n.l7-select-control--image .l7-select-control-item .l7-select-control-item-row {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n line-height: 26px;\n}\n.l7-select-control--image .l7-select-control-item .l7-select-control-item-row > * + * {\n margin-left: 8px;\n}\n.l7-select-control--image .l7-select-control-item.l7-select-control-item-active {\n border-color: #0370fe;\n}\n.l7-select-control--image .l7-select-control-item:nth-child(3n) {\n margin-right: 0;\n}\n.l7-select-control-item {\n cursor: pointer;\n}\n.l7-select-control-item input[type='checkbox'] {\n margin: 0;\n cursor: pointer;\n}\n.l7-select-control--multiple .l7-select-control-item:hover {\n background-color: transparent;\n}\n.l7-control-logo {\n width: 89px;\n height: 16px;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.l7-control-logo img {\n height: 100%;\n width: 100%;\n}\n.l7-control-logo .l7-control-logo-link {\n display: block;\n cursor: pointer;\n}\n.l7-control-logo .l7-control-logo-link img {\n cursor: pointer;\n}\n.l7-control-mouse-location {\n background-color: #fff;\n border-radius: 2px;\n -webkit-box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);\n box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);\n padding: 2px 4px;\n min-width: 130px;\n}\n.l7-control-zoom {\n -webkit-box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);\n box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);\n border-radius: 2px;\n overflow: hidden;\n}\n.l7-control-zoom .l7-button-control {\n -webkit-box-shadow: 0 0 0;\n box-shadow: 0 0 0;\n border-radius: 0;\n font-size: 16px;\n}\n.l7-control-zoom .l7-button-control .l7-iconfont {\n width: 14px;\n height: 14px;\n}\n.l7-control-zoom .l7-button-control:first-child {\n border-bottom: 1px solid #f0f0f0;\n}\n.l7-control-scale {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.l7-control-scale .l7-control-scale-line {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n padding: 2px 5px 1px;\n overflow: hidden;\n color: #595959;\n font-size: 10px;\n line-height: 1.1;\n white-space: nowrap;\n background: #fff;\n border: 2px solid #000;\n border-top: 0;\n -webkit-transition: width 0.1s;\n transition: width 0.1s;\n}\n.l7-control-scale .l7-control-scale-line + .l7-control-scale .l7-control-scale-line {\n margin-top: -2px;\n border-top: 2px solid #777;\n border-bottom: none;\n}\n.l7-right .l7-control-scale {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: end;\n -ms-flex-align: end;\n align-items: flex-end;\n}\n.l7-right .l7-control-scale .l7-control-scale-line {\n text-align: right;\n}\n.l7-popup {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 5;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n will-change: transform;\n}\n.l7-popup.l7-popup-hide {\n display: none;\n}\n.l7-popup .l7-popup-content {\n position: relative;\n padding: 16px;\n font-size: 14px;\n background: #fff;\n border-radius: 3px;\n -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);\n}\n.l7-popup .l7-popup-content .l7-popup-content__title {\n margin-bottom: 8px;\n font-weight: bold;\n}\n.l7-popup .l7-popup-content .l7-popup-content__title,\n.l7-popup .l7-popup-content .l7-popup-content__panel {\n white-space: break-spaces;\n}\n.l7-popup .l7-popup-content .l7-popup-close-button {\n position: absolute;\n top: 0;\n right: 0;\n width: 18px;\n height: 18px;\n padding: 0;\n font-size: 14px;\n line-height: 18px;\n text-align: center;\n background-color: transparent;\n border: 0;\n border-radius: 0 3px 0 0;\n cursor: pointer;\n}\n.l7-popup .l7-popup-tip {\n position: relative;\n z-index: 1;\n width: 0;\n height: 0;\n border: 10px solid transparent;\n}\n.l7-popup.l7-popup-anchor-bottom,\n.l7-popup.l7-popup-anchor-bottom-left,\n.l7-popup.l7-popup-anchor-bottom-right {\n -webkit-box-orient: vertical;\n -webkit-box-direction: reverse;\n -ms-flex-direction: column-reverse;\n flex-direction: column-reverse;\n}\n.l7-popup.l7-popup-anchor-bottom .l7-popup-tip,\n.l7-popup.l7-popup-anchor-bottom-left .l7-popup-tip,\n.l7-popup.l7-popup-anchor-bottom-right .l7-popup-tip {\n bottom: 1px;\n}\n.l7-popup.l7-popup-anchor-top,\n.l7-popup.l7-popup-anchor-top-left,\n.l7-popup.l7-popup-anchor-top-right {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.l7-popup.l7-popup-anchor-top .l7-popup-tip,\n.l7-popup.l7-popup-anchor-top-left .l7-popup-tip,\n.l7-popup.l7-popup-anchor-top-right .l7-popup-tip {\n top: 1px;\n}\n.l7-popup.l7-popup-anchor-left {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n}\n.l7-popup.l7-popup-anchor-right {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: reverse;\n -ms-flex-direction: row-reverse;\n flex-direction: row-reverse;\n}\n.l7-popup-anchor-top .l7-popup-tip {\n position: relative;\n -webkit-align-self: center;\n -ms-flex-item-align: center;\n align-self: center;\n border-top: none;\n border-bottom-color: #fff;\n}\n.l7-popup-anchor-top-left .l7-popup-tip {\n -webkit-align-self: flex-start;\n -ms-flex-item-align: start;\n align-self: flex-start;\n border-top: none;\n border-bottom-color: #fff;\n border-left: none;\n}\n.l7-popup-anchor-top-right .l7-popup-tip {\n -webkit-align-self: flex-end;\n -ms-flex-item-align: end;\n align-self: flex-end;\n border-top: none;\n border-right: none;\n border-bottom-color: #fff;\n}\n.l7-popup-anchor-bottom .l7-popup-tip {\n -webkit-align-self: center;\n -ms-flex-item-align: center;\n align-self: center;\n border-top-color: #fff;\n border-bottom: none;\n}\n.l7-popup-anchor-bottom-left .l7-popup-tip {\n -webkit-align-self: flex-start;\n -ms-flex-item-align: start;\n align-self: flex-start;\n border-top-color: #fff;\n border-bottom: none;\n border-left: none;\n}\n.l7-popup-anchor-bottom-right .l7-popup-tip {\n -webkit-align-self: flex-end;\n -ms-flex-item-align: end;\n align-self: flex-end;\n border-top-color: #fff;\n border-right: none;\n border-bottom: none;\n}\n.l7-popup-anchor-left .l7-popup-tip {\n -webkit-align-self: center;\n -ms-flex-item-align: center;\n align-self: center;\n border-right-color: #fff;\n border-left: none;\n}\n.l7-popup-anchor-right .l7-popup-tip {\n right: 1px;\n -webkit-align-self: center;\n -ms-flex-item-align: center;\n align-self: center;\n border-right: none;\n border-left-color: #fff;\n}\n.l7-popup-anchor-top-left .l7-popup-content {\n border-top-left-radius: 0;\n}\n.l7-popup-anchor-top-right .l7-popup-content {\n border-top-right-radius: 0;\n}\n.l7-popup-anchor-bottom-left .l7-popup-content {\n border-bottom-left-radius: 0;\n}\n.l7-popup-anchor-bottom-right .l7-popup-content {\n border-bottom-right-radius: 0;\n}\n.l7-popup-track-pointer {\n display: none;\n}\n.l7-popup-track-pointer * {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n pointer-events: none;\n}\n.l7-map:hover .l7-popup-track-pointer {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.l7-map:active .l7-popup-track-pointer {\n display: none;\n}\n.l7-layer-popup__row {\n font-size: 12px;\n}\n.l7-layer-popup__row + .l7-layer-popup__row {\n margin-top: 4px;\n}\n");
|
package/lib/popup/layerPopup.js
CHANGED
|
@@ -100,6 +100,7 @@ var LayerPopup = /*#__PURE__*/function (_Popup) {
|
|
|
100
100
|
},
|
|
101
101
|
offsets: [0, 10],
|
|
102
102
|
closeButton: false,
|
|
103
|
+
closeOnClick: false,
|
|
103
104
|
autoClose: false,
|
|
104
105
|
closeOnEsc: false
|
|
105
106
|
});
|
|
@@ -199,15 +200,16 @@ var LayerPopup = /*#__PURE__*/function (_Popup) {
|
|
|
199
200
|
key: "onLayerMouseMove",
|
|
200
201
|
value: function onLayerMouseMove(layer, e) {
|
|
201
202
|
if (!this.isSameFeature(layer, e.featureId)) {
|
|
202
|
-
var
|
|
203
|
-
|
|
203
|
+
var _this$getLayerInfoFra = this.getLayerInfoFrag(layer, e),
|
|
204
|
+
title = _this$getLayerInfoFra.title,
|
|
205
|
+
content = _this$getLayerInfoFra.content;
|
|
206
|
+
|
|
207
|
+
this.setDOMContent(content);
|
|
208
|
+
this.setTitle(title);
|
|
204
209
|
this.displayFeatureInfo = {
|
|
205
210
|
layer: layer,
|
|
206
211
|
featureId: e.featureId
|
|
207
212
|
};
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
if (!this.isShow) {
|
|
211
213
|
this.show();
|
|
212
214
|
}
|
|
213
215
|
} // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -227,14 +229,18 @@ var LayerPopup = /*#__PURE__*/function (_Popup) {
|
|
|
227
229
|
if (this.isShow && this.isSameFeature(layer, e.featureId)) {
|
|
228
230
|
this.hide();
|
|
229
231
|
} else {
|
|
230
|
-
var
|
|
231
|
-
|
|
232
|
+
var _this$getLayerInfoFra2 = this.getLayerInfoFrag(layer, e),
|
|
233
|
+
title = _this$getLayerInfoFra2.title,
|
|
234
|
+
content = _this$getLayerInfoFra2.content;
|
|
235
|
+
|
|
236
|
+
this.setDOMContent(content);
|
|
232
237
|
this.setLnglat(e.lngLat);
|
|
233
|
-
this.
|
|
238
|
+
this.setTitle(title);
|
|
234
239
|
this.displayFeatureInfo = {
|
|
235
240
|
layer: layer,
|
|
236
241
|
featureId: e.featureId
|
|
237
242
|
};
|
|
243
|
+
this.show();
|
|
238
244
|
}
|
|
239
245
|
}
|
|
240
246
|
}, {
|
|
@@ -258,7 +264,8 @@ var LayerPopup = /*#__PURE__*/function (_Popup) {
|
|
|
258
264
|
key: "getLayerInfoFrag",
|
|
259
265
|
value: function getLayerInfoFrag(layer, e) {
|
|
260
266
|
var layerInfo = this.layerConfigMap.get(layer);
|
|
261
|
-
var
|
|
267
|
+
var titleFrag;
|
|
268
|
+
var contentFrag = document.createDocumentFragment();
|
|
262
269
|
|
|
263
270
|
if (layerInfo) {
|
|
264
271
|
var _feature = e.feature;
|
|
@@ -267,30 +274,59 @@ var LayerPopup = /*#__PURE__*/function (_Popup) {
|
|
|
267
274
|
_feature = _feature.properties;
|
|
268
275
|
}
|
|
269
276
|
|
|
270
|
-
var
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
277
|
+
var title = layerInfo.title,
|
|
278
|
+
fields = layerInfo.fields,
|
|
279
|
+
customContent = layerInfo.customContent;
|
|
280
|
+
|
|
281
|
+
if (title) {
|
|
282
|
+
titleFrag = document.createDocumentFragment();
|
|
283
|
+
var titleElement = title instanceof Function ? title(_feature) : title;
|
|
284
|
+
|
|
285
|
+
_l7Utils.DOM.appendElementType(titleFrag, titleElement);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
if (customContent) {
|
|
289
|
+
var content = customContent instanceof Function ? customContent(_feature) : customContent;
|
|
290
|
+
|
|
291
|
+
_l7Utils.DOM.appendElementType(contentFrag, content);
|
|
292
|
+
} else if (fields !== null && fields !== void 0 && fields.length) {
|
|
293
|
+
fields === null || fields === void 0 ? void 0 : fields.forEach(function (fieldConfig) {
|
|
294
|
+
var _ref3, _ref4;
|
|
295
|
+
|
|
296
|
+
var _ref2 = typeof fieldConfig === 'string' ? // tslint:disable-next-line:no-object-literal-type-assertion
|
|
297
|
+
{
|
|
298
|
+
field: fieldConfig
|
|
299
|
+
} : fieldConfig,
|
|
300
|
+
field = _ref2.field,
|
|
301
|
+
formatField = _ref2.formatField,
|
|
302
|
+
formatValue = _ref2.formatValue,
|
|
303
|
+
getValue = _ref2.getValue;
|
|
304
|
+
|
|
305
|
+
var row = _l7Utils.DOM.create('div', 'l7-layer-popup__row');
|
|
306
|
+
|
|
307
|
+
var value = getValue ? getValue(e.feature) : (0, _lodash.get)(_feature, field);
|
|
308
|
+
var fieldElement = (_ref3 = formatField instanceof Function ? formatField(field, _feature) : formatField) !== null && _ref3 !== void 0 ? _ref3 : field;
|
|
309
|
+
var valueElement = (_ref4 = formatValue instanceof Function ? formatValue(value, _feature) : formatValue) !== null && _ref4 !== void 0 ? _ref4 : value;
|
|
310
|
+
|
|
311
|
+
var fieldSpan = _l7Utils.DOM.create('span', 'l7-layer-popup__key', row);
|
|
312
|
+
|
|
313
|
+
_l7Utils.DOM.appendElementType(fieldSpan, fieldElement);
|
|
314
|
+
|
|
315
|
+
_l7Utils.DOM.appendElementType(fieldSpan, document.createTextNode(':'));
|
|
316
|
+
|
|
317
|
+
var valueSpan = _l7Utils.DOM.create('span', 'l7-layer-popup__value', row);
|
|
318
|
+
|
|
319
|
+
_l7Utils.DOM.appendElementType(valueSpan, valueElement);
|
|
320
|
+
|
|
321
|
+
contentFrag.appendChild(row);
|
|
322
|
+
});
|
|
323
|
+
}
|
|
291
324
|
}
|
|
292
325
|
|
|
293
|
-
return
|
|
326
|
+
return {
|
|
327
|
+
title: titleFrag,
|
|
328
|
+
content: contentFrag
|
|
329
|
+
};
|
|
294
330
|
}
|
|
295
331
|
/**
|
|
296
332
|
* 通过 Layer 配置访问到真实的 Layer 实例
|