@antv/l7-component 2.17.4 → 2.17.5
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/assets/iconfont/iconfont.js +10 -17
- package/es/control/baseControl/buttonControl.js +9 -42
- package/es/control/baseControl/control.js +24 -53
- package/es/control/baseControl/popperControl.js +10 -24
- package/es/control/baseControl/selectControl.js +6 -45
- package/es/control/exportImage.js +76 -116
- package/es/control/fullscreen.js +20 -53
- package/es/control/geoLocate.js +36 -66
- package/es/control/layerSwitch.js +0 -31
- package/es/control/logo.js +2 -14
- package/es/control/mapTheme.js +7 -32
- package/es/control/mouseLocation.js +2 -23
- package/es/control/scale.js +6 -29
- package/es/control/zoom.js +0 -23
- package/es/index.js +2 -12
- package/es/marker-layer.js +41 -75
- package/es/marker.js +29 -83
- package/es/popup/layerPopup.js +31 -82
- package/es/popup/popup.js +48 -127
- package/es/utils/anchor.js +3 -7
- package/es/utils/popper.js +15 -64
- package/es/utils/screenfull.js +23 -52
- package/lib/assets/iconfont/iconfont.js +10 -17
- package/lib/control/baseControl/buttonControl.js +9 -52
- package/lib/control/baseControl/control.js +24 -68
- package/lib/control/baseControl/index.js +0 -4
- package/lib/control/baseControl/popperControl.js +10 -29
- package/lib/control/baseControl/selectControl.js +6 -60
- package/lib/control/exportImage.js +76 -125
- package/lib/control/fullscreen.js +20 -60
- package/lib/control/geoLocate.js +36 -75
- package/lib/control/layerSwitch.js +0 -36
- package/lib/control/logo.js +2 -26
- package/lib/control/mapTheme.js +7 -42
- package/lib/control/mouseLocation.js +2 -33
- package/lib/control/scale.js +6 -40
- package/lib/control/zoom.js +0 -33
- package/lib/index.js +0 -30
- package/lib/marker-layer.js +39 -86
- package/lib/marker.js +29 -91
- package/lib/popup/layerPopup.js +29 -94
- package/lib/popup/popup.js +48 -139
- package/lib/utils/anchor.js +4 -9
- package/lib/utils/icon.js +0 -2
- package/lib/utils/popper.js +14 -71
- package/lib/utils/screenfull.js +23 -54
- package/package.json +6 -6
package/lib/control/scale.js
CHANGED
|
@@ -1,52 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = exports.Scale = void 0;
|
|
9
|
-
|
|
10
8
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
11
|
-
|
|
12
9
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
13
|
-
|
|
14
10
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
15
|
-
|
|
16
11
|
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
17
|
-
|
|
18
12
|
var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
|
|
19
|
-
|
|
20
13
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
21
|
-
|
|
22
14
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
23
|
-
|
|
24
15
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
25
|
-
|
|
26
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
27
|
-
|
|
28
17
|
var _l7Utils = require("@antv/l7-utils");
|
|
29
|
-
|
|
30
18
|
var _baseControl = require("./baseControl");
|
|
31
|
-
|
|
32
19
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
33
|
-
|
|
34
20
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
35
|
-
|
|
36
21
|
var Scale = /*#__PURE__*/function (_Control) {
|
|
37
22
|
(0, _inherits2.default)(Scale, _Control);
|
|
38
|
-
|
|
39
23
|
var _super = _createSuper(Scale);
|
|
40
|
-
|
|
41
24
|
function Scale() {
|
|
42
25
|
var _this;
|
|
43
|
-
|
|
44
26
|
(0, _classCallCheck2.default)(this, Scale);
|
|
45
|
-
|
|
46
27
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
47
28
|
args[_key] = arguments[_key];
|
|
48
29
|
}
|
|
49
|
-
|
|
50
30
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
51
31
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "update", function () {
|
|
52
32
|
var mapsService = _this.mapsService;
|
|
@@ -55,12 +35,10 @@ var Scale = /*#__PURE__*/function (_Control) {
|
|
|
55
35
|
var p1 = mapsService.containerToLngLat([0, y]);
|
|
56
36
|
var p2 = mapsService.containerToLngLat([maxWidth, y]);
|
|
57
37
|
var maxMeters = (0, _l7Utils.lnglatDistance)([p1.lng, p1.lat], [p2.lng, p2.lat]);
|
|
58
|
-
|
|
59
38
|
_this.updateScales(maxMeters);
|
|
60
39
|
});
|
|
61
40
|
return _this;
|
|
62
41
|
}
|
|
63
|
-
|
|
64
42
|
(0, _createClass2.default)(Scale, [{
|
|
65
43
|
key: "getDefault",
|
|
66
44
|
value: function getDefault(option) {
|
|
@@ -78,9 +56,7 @@ var Scale = /*#__PURE__*/function (_Control) {
|
|
|
78
56
|
key: "onAdd",
|
|
79
57
|
value: function onAdd() {
|
|
80
58
|
var className = 'l7-control-scale';
|
|
81
|
-
|
|
82
59
|
var container = _l7Utils.DOM.create('div', className);
|
|
83
|
-
|
|
84
60
|
this.resetScaleLines(container);
|
|
85
61
|
var updateWhenIdle = this.controlOption.updateWhenIdle;
|
|
86
62
|
this.mapsService.on(updateWhenIdle ? 'moveend' : 'mapmove', this.update);
|
|
@@ -98,7 +74,6 @@ var Scale = /*#__PURE__*/function (_Control) {
|
|
|
98
74
|
key: "setOptions",
|
|
99
75
|
value: function setOptions(newOption) {
|
|
100
76
|
(0, _get2.default)((0, _getPrototypeOf2.default)(Scale.prototype), "setOptions", this).call(this, newOption);
|
|
101
|
-
|
|
102
77
|
if (this.checkUpdateOption(newOption, ['lockWidth', 'maxWidth', 'metric', 'updateWhenIdle', 'imperial'])) {
|
|
103
78
|
this.resetScaleLines(this.container);
|
|
104
79
|
}
|
|
@@ -107,13 +82,11 @@ var Scale = /*#__PURE__*/function (_Control) {
|
|
|
107
82
|
key: "updateScales",
|
|
108
83
|
value: function updateScales(maxMeters) {
|
|
109
84
|
var _this$controlOption = this.controlOption,
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
85
|
+
metric = _this$controlOption.metric,
|
|
86
|
+
imperial = _this$controlOption.imperial;
|
|
113
87
|
if (metric && maxMeters) {
|
|
114
88
|
this.updateMetric(maxMeters);
|
|
115
89
|
}
|
|
116
|
-
|
|
117
90
|
if (imperial && maxMeters) {
|
|
118
91
|
this.updateImperial(maxMeters);
|
|
119
92
|
}
|
|
@@ -122,25 +95,20 @@ var Scale = /*#__PURE__*/function (_Control) {
|
|
|
122
95
|
key: "resetScaleLines",
|
|
123
96
|
value: function resetScaleLines(container) {
|
|
124
97
|
_l7Utils.DOM.clearChildren(container);
|
|
125
|
-
|
|
126
98
|
var _this$controlOption2 = this.controlOption,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
99
|
+
metric = _this$controlOption2.metric,
|
|
100
|
+
imperial = _this$controlOption2.imperial,
|
|
101
|
+
maxWidth = _this$controlOption2.maxWidth,
|
|
102
|
+
lockWidth = _this$controlOption2.lockWidth;
|
|
132
103
|
if (lockWidth) {
|
|
133
104
|
_l7Utils.DOM.addStyle(container, "width: ".concat(maxWidth, "px"));
|
|
134
105
|
}
|
|
135
|
-
|
|
136
106
|
if (metric) {
|
|
137
107
|
this.mScale = _l7Utils.DOM.create('div', 'l7-control-scale-line', container);
|
|
138
108
|
}
|
|
139
|
-
|
|
140
109
|
if (imperial) {
|
|
141
110
|
this.iScale = _l7Utils.DOM.create('div', 'l7-control-scale-line', container);
|
|
142
111
|
}
|
|
143
|
-
|
|
144
112
|
this.update();
|
|
145
113
|
}
|
|
146
114
|
}, {
|
|
@@ -172,7 +140,6 @@ var Scale = /*#__PURE__*/function (_Control) {
|
|
|
172
140
|
var maxMiles;
|
|
173
141
|
var miles;
|
|
174
142
|
var feet;
|
|
175
|
-
|
|
176
143
|
if (maxFeet > 5280) {
|
|
177
144
|
maxMiles = maxFeet / 5280;
|
|
178
145
|
miles = this.getRoundNum(maxMiles);
|
|
@@ -185,5 +152,4 @@ var Scale = /*#__PURE__*/function (_Control) {
|
|
|
185
152
|
}]);
|
|
186
153
|
return Scale;
|
|
187
154
|
}(_baseControl.Control);
|
|
188
|
-
|
|
189
155
|
exports.default = exports.Scale = Scale;
|
package/lib/control/zoom.js
CHANGED
|
@@ -1,56 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = exports.Zoom = void 0;
|
|
9
|
-
|
|
10
8
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
11
|
-
|
|
12
9
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
13
|
-
|
|
14
10
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
15
|
-
|
|
16
11
|
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
17
|
-
|
|
18
12
|
var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
|
|
19
|
-
|
|
20
13
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
21
|
-
|
|
22
14
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
23
|
-
|
|
24
15
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
25
|
-
|
|
26
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
27
|
-
|
|
28
17
|
var _l7Core = require("@antv/l7-core");
|
|
29
|
-
|
|
30
18
|
var _l7Utils = require("@antv/l7-utils");
|
|
31
|
-
|
|
32
19
|
var _icon = require("../utils/icon");
|
|
33
|
-
|
|
34
20
|
var _baseControl = require("./baseControl");
|
|
35
|
-
|
|
36
21
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
37
|
-
|
|
38
22
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
39
|
-
|
|
40
23
|
var Zoom = /*#__PURE__*/function (_Control) {
|
|
41
24
|
(0, _inherits2.default)(Zoom, _Control);
|
|
42
|
-
|
|
43
25
|
var _super = _createSuper(Zoom);
|
|
44
|
-
|
|
45
26
|
function Zoom() {
|
|
46
27
|
var _this;
|
|
47
|
-
|
|
48
28
|
(0, _classCallCheck2.default)(this, Zoom);
|
|
49
|
-
|
|
50
29
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
51
30
|
args[_key] = arguments[_key];
|
|
52
31
|
}
|
|
53
|
-
|
|
54
32
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
55
33
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "zoomIn", function () {
|
|
56
34
|
if (!_this.disabled && _this.mapsService.getZoom() < _this.mapsService.getMaxZoom()) {
|
|
@@ -64,22 +42,17 @@ var Zoom = /*#__PURE__*/function (_Control) {
|
|
|
64
42
|
});
|
|
65
43
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "updateDisabled", function () {
|
|
66
44
|
var mapsService = _this.mapsService;
|
|
67
|
-
|
|
68
45
|
_this.zoomInButton.removeAttribute('disabled');
|
|
69
|
-
|
|
70
46
|
_this.zoomOutButton.removeAttribute('disabled');
|
|
71
|
-
|
|
72
47
|
if (_this.disabled || mapsService.getZoom() <= mapsService.getMinZoom()) {
|
|
73
48
|
_this.zoomOutButton.setAttribute('disabled', 'true');
|
|
74
49
|
}
|
|
75
|
-
|
|
76
50
|
if (_this.disabled || mapsService.getZoom() >= mapsService.getMaxZoom()) {
|
|
77
51
|
_this.zoomInButton.setAttribute('disabled', 'true');
|
|
78
52
|
}
|
|
79
53
|
});
|
|
80
54
|
return _this;
|
|
81
55
|
}
|
|
82
|
-
|
|
83
56
|
(0, _createClass2.default)(Zoom, [{
|
|
84
57
|
key: "getDefault",
|
|
85
58
|
value: function getDefault(option) {
|
|
@@ -96,7 +69,6 @@ var Zoom = /*#__PURE__*/function (_Control) {
|
|
|
96
69
|
key: "setOptions",
|
|
97
70
|
value: function setOptions(newOptions) {
|
|
98
71
|
(0, _get2.default)((0, _getPrototypeOf2.default)(Zoom.prototype), "setOptions", this).call(this, newOptions);
|
|
99
|
-
|
|
100
72
|
if (this.checkUpdateOption(newOptions, ['zoomInText', 'zoomInTitle', 'zoomOutText', 'zoomOutTitle'])) {
|
|
101
73
|
this.resetButtonGroup(this.container);
|
|
102
74
|
}
|
|
@@ -105,7 +77,6 @@ var Zoom = /*#__PURE__*/function (_Control) {
|
|
|
105
77
|
key: "onAdd",
|
|
106
78
|
value: function onAdd() {
|
|
107
79
|
var container = _l7Utils.DOM.create('div', 'l7-control-zoom');
|
|
108
|
-
|
|
109
80
|
this.resetButtonGroup(container);
|
|
110
81
|
this.mapsService.on('zoomend', this.updateDisabled);
|
|
111
82
|
this.mapsService.on('zoomchange', this.updateDisabled);
|
|
@@ -135,7 +106,6 @@ var Zoom = /*#__PURE__*/function (_Control) {
|
|
|
135
106
|
key: "resetButtonGroup",
|
|
136
107
|
value: function resetButtonGroup(container) {
|
|
137
108
|
_l7Utils.DOM.clearChildren(container);
|
|
138
|
-
|
|
139
109
|
this.zoomInButton = this.createButton(this.controlOption.zoomInText, this.controlOption.zoomInTitle, 'l7-button-control', container, this.zoomIn);
|
|
140
110
|
this.zoomOutButton = this.createButton(this.controlOption.zoomOutText, this.controlOption.zoomOutTitle, 'l7-button-control', container, this.zoomOut);
|
|
141
111
|
this.updateDisabled();
|
|
@@ -144,13 +114,11 @@ var Zoom = /*#__PURE__*/function (_Control) {
|
|
|
144
114
|
key: "createButton",
|
|
145
115
|
value: function createButton(html, tile, className, container, fn) {
|
|
146
116
|
var link = _l7Utils.DOM.create('button', className, container);
|
|
147
|
-
|
|
148
117
|
if (typeof html === 'string') {
|
|
149
118
|
link.innerHTML = html;
|
|
150
119
|
} else {
|
|
151
120
|
link.append(html);
|
|
152
121
|
}
|
|
153
|
-
|
|
154
122
|
link.title = tile;
|
|
155
123
|
link.addEventListener('click', fn);
|
|
156
124
|
return link;
|
|
@@ -158,5 +126,4 @@ var Zoom = /*#__PURE__*/function (_Control) {
|
|
|
158
126
|
}]);
|
|
159
127
|
return Zoom;
|
|
160
128
|
}(_baseControl.Control);
|
|
161
|
-
|
|
162
129
|
exports.default = exports.Zoom = Zoom;
|
package/lib/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -98,15 +97,10 @@ Object.defineProperty(exports, "Zoom", {
|
|
|
98
97
|
return _zoom.Zoom;
|
|
99
98
|
}
|
|
100
99
|
});
|
|
101
|
-
|
|
102
100
|
var _marker = _interopRequireDefault(require("./marker"));
|
|
103
|
-
|
|
104
101
|
var _markerLayer = _interopRequireDefault(require("./marker-layer"));
|
|
105
|
-
|
|
106
102
|
require("./assets/iconfont/iconfont.js");
|
|
107
|
-
|
|
108
103
|
var _baseControl = require("./control/baseControl");
|
|
109
|
-
|
|
110
104
|
Object.keys(_baseControl).forEach(function (key) {
|
|
111
105
|
if (key === "default" || key === "__esModule") return;
|
|
112
106
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -118,27 +112,16 @@ Object.keys(_baseControl).forEach(function (key) {
|
|
|
118
112
|
}
|
|
119
113
|
});
|
|
120
114
|
});
|
|
121
|
-
|
|
122
115
|
var _exportImage = require("./control/exportImage");
|
|
123
|
-
|
|
124
116
|
var _fullscreen = require("./control/fullscreen");
|
|
125
|
-
|
|
126
117
|
var _geoLocate = require("./control/geoLocate");
|
|
127
|
-
|
|
128
118
|
var _layerSwitch = require("./control/layerSwitch");
|
|
129
|
-
|
|
130
119
|
var _logo = require("./control/logo");
|
|
131
|
-
|
|
132
120
|
var _mapTheme = require("./control/mapTheme");
|
|
133
|
-
|
|
134
121
|
var _mouseLocation = require("./control/mouseLocation");
|
|
135
|
-
|
|
136
122
|
var _scale = require("./control/scale");
|
|
137
|
-
|
|
138
123
|
var _zoom = require("./control/zoom");
|
|
139
|
-
|
|
140
124
|
var _interface = require("./interface");
|
|
141
|
-
|
|
142
125
|
Object.keys(_interface).forEach(function (key) {
|
|
143
126
|
if (key === "default" || key === "__esModule") return;
|
|
144
127
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -150,50 +133,37 @@ Object.keys(_interface).forEach(function (key) {
|
|
|
150
133
|
}
|
|
151
134
|
});
|
|
152
135
|
});
|
|
153
|
-
|
|
154
136
|
var _layerPopup = require("./popup/layerPopup");
|
|
155
|
-
|
|
156
137
|
var _popup = require("./popup/popup");
|
|
157
|
-
|
|
158
138
|
// 引入样式
|
|
159
139
|
function loadStyles(css, doc) {
|
|
160
140
|
var isMiniAli = typeof my !== 'undefined' && !!my && typeof my.showToast === 'function' && my.isFRM !== true;
|
|
161
141
|
var isWeChatMiniProgram = typeof wx !== 'undefined' && wx !== null && (typeof wx.request !== 'undefined' || typeof wx.miniProgram !== 'undefined');
|
|
162
|
-
|
|
163
142
|
if (isMiniAli || isWeChatMiniProgram) {
|
|
164
143
|
return;
|
|
165
144
|
}
|
|
166
|
-
|
|
167
145
|
if (!doc) doc = document;
|
|
168
|
-
|
|
169
146
|
if (!doc) {
|
|
170
147
|
return;
|
|
171
148
|
}
|
|
172
|
-
|
|
173
149
|
var head = doc.head || doc.getElementsByTagName('head')[0];
|
|
174
|
-
|
|
175
150
|
if (!head) {
|
|
176
151
|
head = doc.createElement('head');
|
|
177
152
|
var body = doc.body || doc.getElementsByTagName('body')[0];
|
|
178
|
-
|
|
179
153
|
if (body) {
|
|
180
154
|
body.parentNode.insertBefore(head, body);
|
|
181
155
|
} else {
|
|
182
156
|
doc.documentElement.appendChild(head);
|
|
183
157
|
}
|
|
184
158
|
}
|
|
185
|
-
|
|
186
159
|
var style = doc.createElement('style');
|
|
187
160
|
style.type = 'text/css';
|
|
188
|
-
|
|
189
161
|
if (style.styleSheet) {
|
|
190
162
|
style.styleSheet.cssText = css;
|
|
191
163
|
} else {
|
|
192
164
|
style.appendChild(doc.createTextNode(css));
|
|
193
165
|
}
|
|
194
|
-
|
|
195
166
|
head.appendChild(style);
|
|
196
167
|
return style;
|
|
197
168
|
}
|
|
198
|
-
|
|
199
169
|
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 pointer-events: none;\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-close-button,\n.l7-popup .l7-popup-content .l7-popup-content__title,\n.l7-popup .l7-popup-content .l7-popup-content__panel {\n white-space: normal;\n -webkit-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n user-select: text;\n pointer-events: initial;\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");
|