svgmap 2.7.2 → 2.8.0
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/README.md +4 -2
- package/demo/es6/package-lock.json +3 -3
- package/demo/html/index.html +4 -2
- package/dist/svgMap.css +19 -0
- package/dist/svgMap.js +168 -27
- package/dist/svgMap.min.css +1 -1
- package/dist/svgMap.min.js +1 -1
- package/package.json +1 -1
- package/src/js/svgMap.js +168 -27
- package/src/scss/map.scss +24 -1
package/README.md
CHANGED
|
@@ -23,8 +23,8 @@ import 'svgmap/dist/svgMap.min.css';
|
|
|
23
23
|
|
|
24
24
|
```html
|
|
25
25
|
<script src="https://cdn.jsdelivr.net/npm/svg-pan-zoom@3.6.1/dist/svg-pan-zoom.min.js"></script>
|
|
26
|
-
<script src="https://cdn.jsdelivr.net/gh/StephanWagner/svgMap@v2.
|
|
27
|
-
<link href="https://cdn.jsdelivr.net/gh/StephanWagner/svgMap@v2.
|
|
26
|
+
<script src="https://cdn.jsdelivr.net/gh/StephanWagner/svgMap@v2.8.0/dist/svgMap.min.js"></script>
|
|
27
|
+
<link href="https://cdn.jsdelivr.net/gh/StephanWagner/svgMap@v2.8.0/dist/svgMap.min.css" rel="stylesheet">
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
---
|
|
@@ -81,7 +81,9 @@ You can pass the following options into svgMap:
|
|
|
81
81
|
| `maxZoom` | `float` | `25` | Maximal zoom level |
|
|
82
82
|
| `initialZoom` | `float` | `1.06` | Initial zoom level |
|
|
83
83
|
| `initialPan` | `object` | | Initial pan on x and y axis (e.g. `{ x: 30, y: 60 }`) |
|
|
84
|
+
| `showContinentSelector` | `boolean` | `false` | Show continent selector |
|
|
84
85
|
| `zoomScaleSensitivity` | `float` | `0.2` | Sensitivity when zooming |
|
|
86
|
+
| `showZoomReset` | `boolean` | `false` | Show zoom reset button |
|
|
85
87
|
| `mouseWheelZoomEnabled` | `boolean` | `true` | Enables or disables zooming with the scroll wheel |
|
|
86
88
|
| `mouseWheelZoomWithKey` | `boolean` | `false` | Allow zooming only when one of the following keys is pressed: SHIFT, CONTROL, ALT, COMMAND, OPTION |
|
|
87
89
|
| `mouseWheelKeyMessage` | `string` | `'Press the [ALT] key to zoom'` | The message when trying to scroll without a key |
|
|
@@ -2051,9 +2051,9 @@
|
|
|
2051
2051
|
}
|
|
2052
2052
|
},
|
|
2053
2053
|
"minimist": {
|
|
2054
|
-
"version": "1.2.
|
|
2055
|
-
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.
|
|
2056
|
-
"integrity": "sha512-
|
|
2054
|
+
"version": "1.2.6",
|
|
2055
|
+
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
|
|
2056
|
+
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
|
|
2057
2057
|
"dev": true
|
|
2058
2058
|
},
|
|
2059
2059
|
"minipass": {
|
package/demo/html/index.html
CHANGED
|
@@ -45,7 +45,8 @@
|
|
|
45
45
|
data: svgMapDataPopulation,
|
|
46
46
|
flagType: 'emoji',
|
|
47
47
|
mouseWheelZoomEnabled: true,
|
|
48
|
-
mouseWheelZoomWithKey: true
|
|
48
|
+
mouseWheelZoomWithKey: true,
|
|
49
|
+
showContinentSelector: true
|
|
49
50
|
});
|
|
50
51
|
</script>
|
|
51
52
|
</div>
|
|
@@ -70,7 +71,8 @@
|
|
|
70
71
|
mouseWheelZoomEnabled: true,
|
|
71
72
|
mouseWheelZoomWithKey: true,
|
|
72
73
|
mouseWheelKeyMessage: 'Bitte [ALT] drücken um zu zoomen',
|
|
73
|
-
mouseWheelKeyMessageMac: 'Bitte [COMMAND] drücken um zu zoomen'
|
|
74
|
+
mouseWheelKeyMessageMac: 'Bitte [COMMAND] drücken um zu zoomen',
|
|
75
|
+
showZoomReset: true
|
|
74
76
|
});
|
|
75
77
|
</script>
|
|
76
78
|
</div>
|
package/dist/svgMap.css
CHANGED
|
@@ -114,6 +114,12 @@
|
|
|
114
114
|
width: 11px;
|
|
115
115
|
height: 3px;
|
|
116
116
|
}
|
|
117
|
+
.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button.svgMap-zoom-reset-button::before {
|
|
118
|
+
width: 11px;
|
|
119
|
+
height: 11px;
|
|
120
|
+
background: none;
|
|
121
|
+
border: 2px solid #666;
|
|
122
|
+
}
|
|
117
123
|
@media (hover: hover) {
|
|
118
124
|
.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button:hover:before, .svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button:hover:after {
|
|
119
125
|
background: #111;
|
|
@@ -125,6 +131,10 @@
|
|
|
125
131
|
.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button.svgMap-disabled:before, .svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button.svgMap-disabled:after {
|
|
126
132
|
background: #ccc;
|
|
127
133
|
}
|
|
134
|
+
.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button.svgMap-zoom-reset-button.svgMap-disabled:before {
|
|
135
|
+
border: 2px solid #ccc;
|
|
136
|
+
background: none;
|
|
137
|
+
}
|
|
128
138
|
.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-in-button {
|
|
129
139
|
margin: 1px 0 1px 1px;
|
|
130
140
|
}
|
|
@@ -135,6 +145,15 @@
|
|
|
135
145
|
.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-out-button {
|
|
136
146
|
margin: 1px 1px 1px 0;
|
|
137
147
|
}
|
|
148
|
+
.svgMap-map-wrapper .svgMap-map-continent-controls-wrapper {
|
|
149
|
+
position: absolute;
|
|
150
|
+
top: 10px;
|
|
151
|
+
right: 10px;
|
|
152
|
+
z-index: 1;
|
|
153
|
+
display: flex;
|
|
154
|
+
border-radius: 2px;
|
|
155
|
+
box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
|
|
156
|
+
}
|
|
138
157
|
.svgMap-map-wrapper .svgMap-country {
|
|
139
158
|
stroke: #fff;
|
|
140
159
|
stroke-width: 1;
|
package/dist/svgMap.js
CHANGED
|
@@ -64,6 +64,9 @@ function svgMapWrapper(svgPanZoom) {
|
|
|
64
64
|
// Set to true to open the link on mobile devices, set to false (default) to show the tooltip
|
|
65
65
|
touchLink: false,
|
|
66
66
|
|
|
67
|
+
// Set to true to show the to show a zoom reset button
|
|
68
|
+
showZoomReset: false,
|
|
69
|
+
|
|
67
70
|
// Called when a tooltip is created to custimize the tooltip content
|
|
68
71
|
onGetTooltip: function (tooltipDiv, countryID, countryValues) {
|
|
69
72
|
return null;
|
|
@@ -76,7 +79,10 @@ function svgMapWrapper(svgPanZoom) {
|
|
|
76
79
|
|
|
77
80
|
// Crimea: Set to 'RU' to make the Crimea part of Russia, by default it is part of the Ukraine
|
|
78
81
|
Crimea: 'UA'
|
|
79
|
-
}
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
// Set to true to show a drop down menu with the continents
|
|
85
|
+
showContinentSelector: false,
|
|
80
86
|
};
|
|
81
87
|
|
|
82
88
|
this.options = Object.assign({}, defaultOptions, options || {});
|
|
@@ -679,6 +685,69 @@ function svgMapWrapper(svgPanZoom) {
|
|
|
679
685
|
ZW: '🇿🇼'
|
|
680
686
|
};
|
|
681
687
|
|
|
688
|
+
svgMap.prototype.continents = {
|
|
689
|
+
"EA": {
|
|
690
|
+
"iso": "EA",
|
|
691
|
+
"name": "World"
|
|
692
|
+
},
|
|
693
|
+
"AF": {
|
|
694
|
+
"iso": "AF",
|
|
695
|
+
"name": "Africa",
|
|
696
|
+
"pan": {
|
|
697
|
+
x: 454, y: 250
|
|
698
|
+
},
|
|
699
|
+
"zoom": 1.90
|
|
700
|
+
},
|
|
701
|
+
"AS": {
|
|
702
|
+
"iso": "AS",
|
|
703
|
+
"name": "Asia",
|
|
704
|
+
"pan": {
|
|
705
|
+
x: 904, y: 80
|
|
706
|
+
},
|
|
707
|
+
"zoom": 1.8
|
|
708
|
+
},
|
|
709
|
+
"EU": {
|
|
710
|
+
"iso": "EU",
|
|
711
|
+
"name": "Europe",
|
|
712
|
+
"pan": {
|
|
713
|
+
x: 404, y: 80
|
|
714
|
+
},
|
|
715
|
+
"zoom": 5
|
|
716
|
+
},
|
|
717
|
+
"NA": {
|
|
718
|
+
"iso": "NA",
|
|
719
|
+
"name": "North America",
|
|
720
|
+
"pan": {
|
|
721
|
+
x: 104, y: 55
|
|
722
|
+
},
|
|
723
|
+
"zoom": 2.6
|
|
724
|
+
},
|
|
725
|
+
|
|
726
|
+
"MA": {
|
|
727
|
+
"iso": "MA",
|
|
728
|
+
"name": "Middle America",
|
|
729
|
+
"pan": {
|
|
730
|
+
x: 104, y: 200
|
|
731
|
+
},
|
|
732
|
+
"zoom": 2.6
|
|
733
|
+
},
|
|
734
|
+
"SA": {
|
|
735
|
+
"iso": "SA",
|
|
736
|
+
"name": "South America",
|
|
737
|
+
"pan": {
|
|
738
|
+
x: 104, y: 340
|
|
739
|
+
},
|
|
740
|
+
"zoom": 2.2
|
|
741
|
+
},
|
|
742
|
+
"OC": {
|
|
743
|
+
"iso": "OC",
|
|
744
|
+
"name": "Oceania",
|
|
745
|
+
"pan": {
|
|
746
|
+
x: 954, y: 350
|
|
747
|
+
},
|
|
748
|
+
"zoom": 1.90
|
|
749
|
+
},
|
|
750
|
+
}
|
|
682
751
|
// Create the SVG map
|
|
683
752
|
|
|
684
753
|
svgMap.prototype.createMap = function () {
|
|
@@ -699,6 +768,7 @@ function svgMapWrapper(svgPanZoom) {
|
|
|
699
768
|
this.mapImage.classList.add('svgMap-map-image');
|
|
700
769
|
this.mapWrapper.appendChild(this.mapImage);
|
|
701
770
|
|
|
771
|
+
|
|
702
772
|
// Add controls
|
|
703
773
|
var mapControlsWrapper = this.createElement(
|
|
704
774
|
'div',
|
|
@@ -710,25 +780,27 @@ function svgMapWrapper(svgPanZoom) {
|
|
|
710
780
|
'svgMap-map-controls-zoom',
|
|
711
781
|
mapControlsWrapper
|
|
712
782
|
);
|
|
713
|
-
['in', 'out'].forEach(
|
|
783
|
+
['in', 'out', 'reset'].forEach(
|
|
714
784
|
function (item) {
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
785
|
+
if (item === 'reset' && this.options.showZoomReset || item !== 'reset') {
|
|
786
|
+
var zoomControlName =
|
|
787
|
+
'zoomControl' + item.charAt(0).toUpperCase() + item.slice(1);
|
|
788
|
+
this[zoomControlName] = this.createElement(
|
|
789
|
+
'button',
|
|
790
|
+
'svgMap-control-button svgMap-zoom-button svgMap-zoom-' +
|
|
720
791
|
item +
|
|
721
792
|
'-button',
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
793
|
+
zoomContainer
|
|
794
|
+
);
|
|
795
|
+
this[zoomControlName].type = 'button';
|
|
796
|
+
this[zoomControlName].addEventListener(
|
|
797
|
+
'click',
|
|
798
|
+
function () {
|
|
799
|
+
this.zoomMap(item);
|
|
800
|
+
}.bind(this),
|
|
801
|
+
{ passive: true }
|
|
802
|
+
);
|
|
803
|
+
}
|
|
732
804
|
}.bind(this)
|
|
733
805
|
);
|
|
734
806
|
|
|
@@ -736,6 +808,41 @@ function svgMapWrapper(svgPanZoom) {
|
|
|
736
808
|
this.zoomControlIn.setAttribute('aria-label', 'Zoom in');
|
|
737
809
|
this.zoomControlOut.setAttribute('aria-label', 'Zoom out');
|
|
738
810
|
|
|
811
|
+
if (this.options.showContinentSelector) {
|
|
812
|
+
// Add continent controls
|
|
813
|
+
var mapContinentControlsWrapper = this.createElement(
|
|
814
|
+
'div',
|
|
815
|
+
'svgMap-map-continent-controls-wrapper',
|
|
816
|
+
this.mapWrapper
|
|
817
|
+
);
|
|
818
|
+
this["continentSelect"] = this.createElement(
|
|
819
|
+
'select',
|
|
820
|
+
'svgMap-continent-select',
|
|
821
|
+
mapContinentControlsWrapper
|
|
822
|
+
);
|
|
823
|
+
var that = this;
|
|
824
|
+
Object.keys(svgMap.prototype.continents).forEach(
|
|
825
|
+
function (item) {
|
|
826
|
+
let element = that.createElement(
|
|
827
|
+
'option',
|
|
828
|
+
'svgMap-continent-option svgMap-continent-iso-' + svgMap.prototype.continents[item].iso,
|
|
829
|
+
that["continentSelect"],
|
|
830
|
+
svgMap.prototype.continents[item].name
|
|
831
|
+
);
|
|
832
|
+
element.value = item
|
|
833
|
+
}
|
|
834
|
+
);
|
|
835
|
+
|
|
836
|
+
this.continentSelect.addEventListener(
|
|
837
|
+
'change',
|
|
838
|
+
function (e) {
|
|
839
|
+
const continent = e.target.value;
|
|
840
|
+
if (continent) this.zoomContinent(e.target.value);
|
|
841
|
+
}.bind(that),
|
|
842
|
+
{ passive: true }
|
|
843
|
+
);
|
|
844
|
+
mapContinentControlsWrapper.setAttribute('aria-label', 'Select continent');
|
|
845
|
+
}
|
|
739
846
|
// Fix countries
|
|
740
847
|
var mapPaths = Object.assign({}, this.mapPaths);
|
|
741
848
|
|
|
@@ -847,13 +954,13 @@ function svgMapWrapper(svgPanZoom) {
|
|
|
847
954
|
}
|
|
848
955
|
|
|
849
956
|
let dragged = false;
|
|
850
|
-
countryElement.addEventListener('mousedown', function(){dragged = false});
|
|
851
|
-
countryElement.addEventListener('touchstart', function(){dragged = false});
|
|
852
|
-
countryElement.addEventListener('mousemove', function(){dragged = true});
|
|
853
|
-
countryElement.addEventListener('touchmove', function(){dragged = true});
|
|
957
|
+
countryElement.addEventListener('mousedown', function () { dragged = false });
|
|
958
|
+
countryElement.addEventListener('touchstart', function () { dragged = false });
|
|
959
|
+
countryElement.addEventListener('mousemove', function () { dragged = true });
|
|
960
|
+
countryElement.addEventListener('touchmove', function () { dragged = true });
|
|
854
961
|
const clickHandler = function (e) {
|
|
855
962
|
if (dragged) {
|
|
856
|
-
|
|
963
|
+
return;
|
|
857
964
|
}
|
|
858
965
|
|
|
859
966
|
const link = countryElement.getAttribute('data-link');
|
|
@@ -982,7 +1089,7 @@ function svgMapWrapper(svgPanZoom) {
|
|
|
982
1089
|
var flagContainer = this.createElement(
|
|
983
1090
|
'div',
|
|
984
1091
|
'svgMap-tooltip-flag-container svgMap-tooltip-flag-container-' +
|
|
985
|
-
|
|
1092
|
+
this.options.flagType,
|
|
986
1093
|
tooltipContentWrapper
|
|
987
1094
|
);
|
|
988
1095
|
|
|
@@ -1048,6 +1155,10 @@ function svgMapWrapper(svgPanZoom) {
|
|
|
1048
1155
|
this.zoomControlIn.setAttribute('aria-disabled', 'false');
|
|
1049
1156
|
this.zoomControlOut.classList.remove('svgMap-disabled');
|
|
1050
1157
|
this.zoomControlOut.setAttribute('aria-disabled', 'false');
|
|
1158
|
+
if (this.options.showZoomReset) {
|
|
1159
|
+
this.zoomControlReset.classList.remove('svgMap-disabled');
|
|
1160
|
+
this.zoomControlReset.setAttribute('aria-disabled', 'false');
|
|
1161
|
+
}
|
|
1051
1162
|
|
|
1052
1163
|
if (this.mapPanZoom.getZoom().toFixed(3) <= this.options.minZoom) {
|
|
1053
1164
|
this.zoomControlOut.classList.add('svgMap-disabled');
|
|
@@ -1057,6 +1168,10 @@ function svgMapWrapper(svgPanZoom) {
|
|
|
1057
1168
|
this.zoomControlIn.classList.add('svgMap-disabled');
|
|
1058
1169
|
this.zoomControlIn.setAttribute('aria-disabled', 'true');
|
|
1059
1170
|
}
|
|
1171
|
+
if (this.options.showZoomReset && this.mapPanZoom.getZoom().toFixed(3) == this.options.initialZoom) {
|
|
1172
|
+
this.zoomControlReset.classList.add('svgMap-disabled');
|
|
1173
|
+
this.zoomControlReset.setAttribute('aria-disabled', 'true');
|
|
1174
|
+
}
|
|
1060
1175
|
};
|
|
1061
1176
|
|
|
1062
1177
|
// Zoom map
|
|
@@ -1069,7 +1184,33 @@ function svgMapWrapper(svgPanZoom) {
|
|
|
1069
1184
|
) {
|
|
1070
1185
|
return false;
|
|
1071
1186
|
}
|
|
1072
|
-
|
|
1187
|
+
if (direction === 'reset') {
|
|
1188
|
+
this.mapPanZoom.reset();
|
|
1189
|
+
if (this.options.initialPan.x != 0 || this.options.initialPan.y != 0) {
|
|
1190
|
+
// Init zoom and pan
|
|
1191
|
+
this.mapPanZoom.zoomAtPointBy(this.options.initialZoom, {
|
|
1192
|
+
x: this.options.initialPan.x,
|
|
1193
|
+
y: this.options.initialPan.y
|
|
1194
|
+
});
|
|
1195
|
+
} else {
|
|
1196
|
+
// Init zoom
|
|
1197
|
+
this.mapPanZoom.zoom(this.options.initialZoom);
|
|
1198
|
+
}
|
|
1199
|
+
} else {
|
|
1200
|
+
this.mapPanZoom[direction == 'in' ? 'zoomIn' : 'zoomOut']();
|
|
1201
|
+
}
|
|
1202
|
+
};
|
|
1203
|
+
|
|
1204
|
+
// Zoom to Contient
|
|
1205
|
+
|
|
1206
|
+
svgMap.prototype.zoomContinent = function (contientIso) {
|
|
1207
|
+
|
|
1208
|
+
const continent = this.continents[contientIso];
|
|
1209
|
+
if (continent.iso == "EA") this.mapPanZoom.reset()
|
|
1210
|
+
else if (continent.pan) {
|
|
1211
|
+
this.mapPanZoom.reset()
|
|
1212
|
+
this.mapPanZoom.zoomAtPoint(continent.zoom, continent.pan);
|
|
1213
|
+
}
|
|
1073
1214
|
};
|
|
1074
1215
|
|
|
1075
1216
|
// Add elements to show the zoom with keys notice
|
|
@@ -1984,15 +2125,15 @@ function svgMapWrapper(svgPanZoom) {
|
|
|
1984
2125
|
ratio = parseFloat(ratio).toFixed(1);
|
|
1985
2126
|
var r = Math.ceil(
|
|
1986
2127
|
parseInt(color1.substring(0, 2), 16) * ratio +
|
|
1987
|
-
|
|
2128
|
+
parseInt(color2.substring(0, 2), 16) * (1 - ratio)
|
|
1988
2129
|
);
|
|
1989
2130
|
var g = Math.ceil(
|
|
1990
2131
|
parseInt(color1.substring(2, 4), 16) * ratio +
|
|
1991
|
-
|
|
2132
|
+
parseInt(color2.substring(2, 4), 16) * (1 - ratio)
|
|
1992
2133
|
);
|
|
1993
2134
|
var b = Math.ceil(
|
|
1994
2135
|
parseInt(color1.substring(4, 6), 16) * ratio +
|
|
1995
|
-
|
|
2136
|
+
parseInt(color2.substring(4, 6), 16) * (1 - ratio)
|
|
1996
2137
|
);
|
|
1997
2138
|
return '#' + this.getHex(r) + this.getHex(g) + this.getHex(b);
|
|
1998
2139
|
};
|
package/dist/svgMap.min.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! svgMap | https://github.com/StephanWagner/svgMap | MIT License | Copyright Stephan Wagner | https://stephanwagner.me */
|
|
2
|
-
.svgMap-container,.svgMap-wrapper{position:relative}.svgMap-block-zoom-notice{position:absolute;z-index:2;top:100%;left:0;right:0;bottom:0;background:rgba(0,0,0,.8);pointer-events:none;opacity:0;color:#fff;transition:opacity 250ms}.svgMap-block-zoom-notice-active .svgMap-block-zoom-notice{pointer-events:all;top:0;opacity:1}.svgMap-block-zoom-notice>div{position:absolute;top:50%;left:0;right:0;text-align:center;padding:0 32px;transform:translateY(-50%);font-size:28px}@media (max-width:900px){.svgMap-block-zoom-notice>div{font-size:22px}}.svgMap-map-wrapper{position:relative;width:100%;padding-top:50%;overflow:hidden;background:#d9ecff;color:#111}.svgMap-map-wrapper *{box-sizing:border-box}.svgMap-map-wrapper :focus:not(:focus-visible){outline:0}.svgMap-map-wrapper .svgMap-map-image{display:block;position:absolute;top:0;left:0;width:100%;height:100%;margin:0}.svgMap-map-wrapper .svgMap-map-controls-wrapper{position:absolute;bottom:10px;left:10px;z-index:1;display:flex;overflow:hidden;border-radius:2px;box-shadow:0 0 0 2px rgba(0,0,0,.1)}.svgMap-map-wrapper .svgMap-map-controls-move,.svgMap-map-wrapper .svgMap-map-controls-zoom{display:flex;margin-right:5px;overflow:hidden;background:#fff}.svgMap-map-wrapper .svgMap-map-controls-move:last-child,.svgMap-map-wrapper .svgMap-map-controls-zoom:last-child{margin-right:0}.svgMap-map-wrapper .svgMap-control-button{background-color:transparent;border:none;border-radius:0;color:inherit;font:inherit;line-height:inherit;margin:0;padding:0;overflow:visible;text-transform:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;width:30px;height:30px;position:relative}.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button:after,.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button:before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background:#666;transition:background-color 250ms}.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button:before{width:11px;height:3px}@media (hover:hover){.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button:hover:after,.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button:hover:before{background:#111}}.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button:active:after,.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button:active:before{background:#111}.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button.svgMap-disabled:after,.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button.svgMap-disabled:before{background:#ccc}.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-in-button{margin:1px 0 1px 1px}.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-in-button:after{width:3px;height:11px}.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-out-button{margin:1px 1px 1px 0}.svgMap-map-wrapper .svgMap-country{stroke:#fff;stroke-width:1;stroke-linejoin:round;vector-effect:non-scaling-stroke;transition:fill 250ms,stroke 250ms}.svgMap-map-wrapper .svgMap-country[data-link]{cursor:pointer}@media (hover:hover){.svgMap-map-wrapper .svgMap-country:hover{stroke:#333;stroke-width:1.5}}.svgMap-map-wrapper .svgMap-country.svgMap-active{stroke:#333;stroke-width:1.5}.svgMap-tooltip{box-shadow:0 0 3px rgba(0,0,0,.2);position:absolute;z-index:2;border-radius:2px;background:#fff;transform:translate(-50%,-100%);border-bottom:1px solid #000;display:none;pointer-events:none;min-width:60px}.svgMap-tooltip.svgMap-tooltip-flipped{transform:translate(-50%,0);border-bottom:0;border-top:1px solid #000}.svgMap-tooltip.svgMap-active{display:block}.svgMap-tooltip .svgMap-tooltip-content-container{position:relative;padding:10px 20px}.svgMap-tooltip .svgMap-tooltip-content-container .svgMap-tooltip-flag-container{text-align:center;margin:2px 0 5px}.svgMap-tooltip .svgMap-tooltip-content-container .svgMap-tooltip-flag-container.svgMap-tooltip-flag-container-emoji{font-size:50px;line-height:0;padding:25px 0 15px}.svgMap-tooltip .svgMap-tooltip-content-container .svgMap-tooltip-flag-container .svgMap-tooltip-flag{display:block;margin:auto;width:auto;height:32px;padding:2px;background:rgba(0,0,0,.15);border-radius:2px}.svgMap-tooltip .svgMap-tooltip-title{white-space:nowrap;font-size:18px;line-height:28px;padding:0 0 8px;text-align:center}.svgMap-tooltip .svgMap-tooltip-content{white-space:nowrap;text-align:center;font-size:14px;color:#777;margin:-5px 0 0}.svgMap-tooltip .svgMap-tooltip-content table{padding:0;border-spacing:0;margin:auto}.svgMap-tooltip .svgMap-tooltip-content table td{padding:2px 0;text-align:left}.svgMap-tooltip .svgMap-tooltip-content table td span{color:#111}.svgMap-tooltip .svgMap-tooltip-content table td:first-child{padding-right:10px;text-align:right}.svgMap-tooltip .svgMap-tooltip-content table td sup{vertical-align:baseline;position:relative;top:-5px}.svgMap-tooltip .svgMap-tooltip-content .svgMap-tooltip-no-data{padding:2px 0;color:#777;font-style:italic}.svgMap-tooltip .svgMap-tooltip-pointer{position:absolute;top:100%;left:50%;transform:translateX(-50%);overflow:hidden;height:10px;width:30px}.svgMap-tooltip .svgMap-tooltip-pointer:after{content:"";width:20px;height:20px;background:#fff;border:1px solid #000;position:absolute;bottom:6px;left:50%;transform:translateX(-50%) rotate(45deg)}.svgMap-tooltip.svgMap-tooltip-flipped .svgMap-tooltip-pointer{bottom:auto;top:-10px;transform:translateX(-50%) scaleY(-1)}
|
|
2
|
+
.svgMap-container,.svgMap-wrapper{position:relative}.svgMap-block-zoom-notice{position:absolute;z-index:2;top:100%;left:0;right:0;bottom:0;background:rgba(0,0,0,.8);pointer-events:none;opacity:0;color:#fff;transition:opacity 250ms}.svgMap-block-zoom-notice-active .svgMap-block-zoom-notice{pointer-events:all;top:0;opacity:1}.svgMap-block-zoom-notice>div{position:absolute;top:50%;left:0;right:0;text-align:center;padding:0 32px;transform:translateY(-50%);font-size:28px}@media (max-width:900px){.svgMap-block-zoom-notice>div{font-size:22px}}.svgMap-map-wrapper{position:relative;width:100%;padding-top:50%;overflow:hidden;background:#d9ecff;color:#111}.svgMap-map-wrapper *{box-sizing:border-box}.svgMap-map-wrapper :focus:not(:focus-visible){outline:0}.svgMap-map-wrapper .svgMap-map-image{display:block;position:absolute;top:0;left:0;width:100%;height:100%;margin:0}.svgMap-map-wrapper .svgMap-map-controls-wrapper{position:absolute;bottom:10px;left:10px;z-index:1;display:flex;overflow:hidden;border-radius:2px;box-shadow:0 0 0 2px rgba(0,0,0,.1)}.svgMap-map-wrapper .svgMap-map-controls-move,.svgMap-map-wrapper .svgMap-map-controls-zoom{display:flex;margin-right:5px;overflow:hidden;background:#fff}.svgMap-map-wrapper .svgMap-map-controls-move:last-child,.svgMap-map-wrapper .svgMap-map-controls-zoom:last-child{margin-right:0}.svgMap-map-wrapper .svgMap-control-button{background-color:transparent;border:none;border-radius:0;color:inherit;font:inherit;line-height:inherit;margin:0;padding:0;overflow:visible;text-transform:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;width:30px;height:30px;position:relative}.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button:after,.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button:before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background:#666;transition:background-color 250ms}.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button:before{width:11px;height:3px}.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button.svgMap-zoom-reset-button::before{width:11px;height:11px;background:0 0;border:2px solid #666}@media (hover:hover){.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button:hover:after,.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button:hover:before{background:#111}}.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button:active:after,.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button:active:before{background:#111}.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button.svgMap-disabled:after,.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button.svgMap-disabled:before{background:#ccc}.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-button.svgMap-zoom-reset-button.svgMap-disabled:before{border:2px solid #ccc;background:0 0}.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-in-button{margin:1px 0 1px 1px}.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-in-button:after{width:3px;height:11px}.svgMap-map-wrapper .svgMap-control-button.svgMap-zoom-out-button{margin:1px 1px 1px 0}.svgMap-map-wrapper .svgMap-map-continent-controls-wrapper{position:absolute;top:10px;right:10px;z-index:1;display:flex;border-radius:2px;box-shadow:0 0 0 2px rgba(0,0,0,.1)}.svgMap-map-wrapper .svgMap-country{stroke:#fff;stroke-width:1;stroke-linejoin:round;vector-effect:non-scaling-stroke;transition:fill 250ms,stroke 250ms}.svgMap-map-wrapper .svgMap-country[data-link]{cursor:pointer}@media (hover:hover){.svgMap-map-wrapper .svgMap-country:hover{stroke:#333;stroke-width:1.5}}.svgMap-map-wrapper .svgMap-country.svgMap-active{stroke:#333;stroke-width:1.5}.svgMap-tooltip{box-shadow:0 0 3px rgba(0,0,0,.2);position:absolute;z-index:2;border-radius:2px;background:#fff;transform:translate(-50%,-100%);border-bottom:1px solid #000;display:none;pointer-events:none;min-width:60px}.svgMap-tooltip.svgMap-tooltip-flipped{transform:translate(-50%,0);border-bottom:0;border-top:1px solid #000}.svgMap-tooltip.svgMap-active{display:block}.svgMap-tooltip .svgMap-tooltip-content-container{position:relative;padding:10px 20px}.svgMap-tooltip .svgMap-tooltip-content-container .svgMap-tooltip-flag-container{text-align:center;margin:2px 0 5px}.svgMap-tooltip .svgMap-tooltip-content-container .svgMap-tooltip-flag-container.svgMap-tooltip-flag-container-emoji{font-size:50px;line-height:0;padding:25px 0 15px}.svgMap-tooltip .svgMap-tooltip-content-container .svgMap-tooltip-flag-container .svgMap-tooltip-flag{display:block;margin:auto;width:auto;height:32px;padding:2px;background:rgba(0,0,0,.15);border-radius:2px}.svgMap-tooltip .svgMap-tooltip-title{white-space:nowrap;font-size:18px;line-height:28px;padding:0 0 8px;text-align:center}.svgMap-tooltip .svgMap-tooltip-content{white-space:nowrap;text-align:center;font-size:14px;color:#777;margin:-5px 0 0}.svgMap-tooltip .svgMap-tooltip-content table{padding:0;border-spacing:0;margin:auto}.svgMap-tooltip .svgMap-tooltip-content table td{padding:2px 0;text-align:left}.svgMap-tooltip .svgMap-tooltip-content table td span{color:#111}.svgMap-tooltip .svgMap-tooltip-content table td:first-child{padding-right:10px;text-align:right}.svgMap-tooltip .svgMap-tooltip-content table td sup{vertical-align:baseline;position:relative;top:-5px}.svgMap-tooltip .svgMap-tooltip-content .svgMap-tooltip-no-data{padding:2px 0;color:#777;font-style:italic}.svgMap-tooltip .svgMap-tooltip-pointer{position:absolute;top:100%;left:50%;transform:translateX(-50%);overflow:hidden;height:10px;width:30px}.svgMap-tooltip .svgMap-tooltip-pointer:after{content:"";width:20px;height:20px;background:#fff;border:1px solid #000;position:absolute;bottom:6px;left:50%;transform:translateX(-50%) rotate(45deg)}.svgMap-tooltip.svgMap-tooltip-flipped .svgMap-tooltip-pointer{bottom:auto;top:-10px;transform:translateX(-50%) scaleY(-1)}
|