eurostat-map 4.11.3 → 4.12.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/build/323.eurostatmap.min.js +1 -1
- package/build/eurostatmap.js +162 -67
- package/build/eurostatmap.min.js +2 -2
- package/build/eurostatmap.min.js.map +1 -1
- package/build/package.json +1 -1
- package/build/types/core/InsetConfig.d.ts +2 -0
- package/build/types/core/MapConfig.d.ts +26 -0
- package/build/types/core/MapInstance.d.ts +37 -0
- package/build/types/legend/choropleth/BivariateLegendConfig.d.ts +3 -0
- package/package.json +1 -1
package/build/package.json
CHANGED
|
@@ -37,6 +37,8 @@ export interface InsetConfig {
|
|
|
37
37
|
zoomButtons?: boolean
|
|
38
38
|
/** Custom base URL for this inset's nuts2json boundary data. */
|
|
39
39
|
nuts2jsonBaseURL?: string
|
|
40
|
+
/** Custom URL for this inset's world boundaries topojson (only relevant if the inset's `geo` is 'WORLD'). */
|
|
41
|
+
worldTopojsonURL?: string
|
|
40
42
|
/** Custom D3 projection function for this inset. */
|
|
41
43
|
projectionFunction?: Function | boolean
|
|
42
44
|
|
|
@@ -38,6 +38,24 @@ export interface MapConfig {
|
|
|
38
38
|
nutsLevel?: number | 'mixed'
|
|
39
39
|
/** NUTS boundary year. */
|
|
40
40
|
nutsYear?: number | string
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Base URL used to fetch NUTS2JSON boundary geometries. Applies to the top-level map and
|
|
44
|
+
* (unless a given inset overrides it via `InsetConfig.nuts2jsonBaseURL`) all of its insets.
|
|
45
|
+
* @default 'https://raw.githubusercontent.com/eurostat/Nuts2json/master/pub/v2' (or the
|
|
46
|
+
* ec.europa.eu cache when running on an ec.europa.eu host)
|
|
47
|
+
*/
|
|
48
|
+
nuts2jsonBaseURL?: string
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* URL of the world boundaries topojson file used by `geo: 'WORLD'` maps. Not part of
|
|
52
|
+
* Nuts2json (a separate, bundled eurostat-map asset), so it is independent of
|
|
53
|
+
* `nuts2jsonBaseURL`. Applies to the top-level map and all of its insets.
|
|
54
|
+
* @default 'https://raw.githubusercontent.com/eurostat/eurostat-map/master/src/assets/topojson/WORLD_4326.json'
|
|
55
|
+
* (or the ec.europa.eu asset host when running on an ec.europa.eu host)
|
|
56
|
+
*/
|
|
57
|
+
worldTopojsonURL?: string
|
|
58
|
+
|
|
41
59
|
/** Geographic center as [longitude, latitude]. */
|
|
42
60
|
geoCenter?: [number, number]
|
|
43
61
|
|
|
@@ -130,6 +148,14 @@ export interface MapConfig {
|
|
|
130
148
|
/** Zoom and pan settings. */
|
|
131
149
|
zoomExtent?: [number, number]
|
|
132
150
|
|
|
151
|
+
/**
|
|
152
|
+
* Divides the exact bbox-fit pixel size used when position().z is left unset, so the
|
|
153
|
+
* default view is zoomed in tighter than an exact fit (which tends to look too zoomed
|
|
154
|
+
* out). Higher = more zoomed in by default; 1 = exact fit.
|
|
155
|
+
* @default 1.27
|
|
156
|
+
*/
|
|
157
|
+
defaultFitZoom?: number
|
|
158
|
+
|
|
133
159
|
/** D3 zoom translate extent (pan boundaries), as [[x0, y0], [x1, y1]]. */
|
|
134
160
|
translateExtent?: [[number, number], [number, number]]
|
|
135
161
|
|
|
@@ -77,6 +77,26 @@ export interface MapInstance {
|
|
|
77
77
|
nutsYear(): number
|
|
78
78
|
nutsYear(year: number): this
|
|
79
79
|
|
|
80
|
+
/**
|
|
81
|
+
* Base URL used to fetch NUTS2JSON boundary geometries (and, for insets, whatever
|
|
82
|
+
* base URL is set on the owning map, unless overridden per-inset). Setting this on the
|
|
83
|
+
* top-level map also propagates it to all insets.
|
|
84
|
+
* @default 'https://raw.githubusercontent.com/eurostat/Nuts2json/master/pub/v2' (or the
|
|
85
|
+
* ec.europa.eu cache when running on an ec.europa.eu host)
|
|
86
|
+
*/
|
|
87
|
+
nuts2jsonBaseURL(): string
|
|
88
|
+
nuts2jsonBaseURL(url: string): this
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* URL of the world boundaries topojson file used by `geo('WORLD')` maps. Not part of
|
|
92
|
+
* Nuts2json (a separate, bundled eurostat-map asset), so it is independent of
|
|
93
|
+
* `nuts2jsonBaseURL`. Setting this on the top-level map also propagates it to all insets.
|
|
94
|
+
* @default 'https://raw.githubusercontent.com/eurostat/eurostat-map/master/src/assets/topojson/WORLD_4326.json'
|
|
95
|
+
* (or the ec.europa.eu asset host when running on an ec.europa.eu host)
|
|
96
|
+
*/
|
|
97
|
+
worldTopojsonURL(): string
|
|
98
|
+
worldTopojsonURL(url: string): this
|
|
99
|
+
|
|
80
100
|
/**
|
|
81
101
|
* Initial map viewport. x/y in projected coordinates, z is pixel size
|
|
82
102
|
* (map units per screen pixel — smaller = more zoomed in).
|
|
@@ -85,6 +105,16 @@ export interface MapInstance {
|
|
|
85
105
|
position(v: { x?: number; y?: number; z?: number }): this
|
|
86
106
|
position(): { x: number; y: number; z: number }
|
|
87
107
|
|
|
108
|
+
/**
|
|
109
|
+
* Divides the exact bbox-fit pixel size used when position().z is left unset, so the
|
|
110
|
+
* default view is zoomed in tighter than an exact fit (which tends to look too zoomed
|
|
111
|
+
* out). Higher = more zoomed in by default; 1 = exact fit.
|
|
112
|
+
* @default 1.27
|
|
113
|
+
* @example map.defaultFitZoom(1.5)
|
|
114
|
+
*/
|
|
115
|
+
defaultFitZoom(): number
|
|
116
|
+
defaultFitZoom(factor: number): this
|
|
117
|
+
|
|
88
118
|
/**
|
|
89
119
|
* Custom D3 projection function. When set, also call proj('4326').
|
|
90
120
|
* @example map.projectionFunction(d3.geoAzimuthalEquidistant().rotate([-10, -52]))
|
|
@@ -398,6 +428,13 @@ export interface MapInstance {
|
|
|
398
428
|
backgroundMap(): boolean
|
|
399
429
|
backgroundMap(show: boolean): this
|
|
400
430
|
|
|
431
|
+
/**
|
|
432
|
+
* Shows or hides the background map on an already-built instance to match the current
|
|
433
|
+
* backgroundMap() value, without a full rebuild - draws it on demand if it wasn't already
|
|
434
|
+
* built. No-op for grid cartograms.
|
|
435
|
+
*/
|
|
436
|
+
updateBackgroundMap(): this
|
|
437
|
+
|
|
401
438
|
/** Minimap (globe inset showing current viewport) configuration. */
|
|
402
439
|
minimap(): MinimapConfig | undefined
|
|
403
440
|
minimap(config: MinimapConfig): this
|
|
@@ -48,6 +48,9 @@ export interface BivariateLegendConfig extends LegendConfig {
|
|
|
48
48
|
/** Whether to show arrows at the end of both axes, or for each axis independently. @default true */
|
|
49
49
|
axisArrows?: boolean | { x?: boolean; y?: boolean }
|
|
50
50
|
|
|
51
|
+
/** Whether axis arrows are bidirectional (arrowhead at both ends), for both axes or each axis independently. Has no effect on an axis where `axisArrows` is disabled. @default false */
|
|
52
|
+
axisArrowsBidirectional?: boolean | { x?: boolean; y?: boolean }
|
|
53
|
+
|
|
51
54
|
/** Height of axis arrows in pixels. @default 5 */
|
|
52
55
|
arrowHeight?: number
|
|
53
56
|
|
package/package.json
CHANGED