ixmaps-gl 0.2.20 → 0.2.21
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 +45 -8
- package/ixmaps-gl.js +2134 -95
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -46,7 +46,11 @@ page. It currently implements:
|
|
|
46
46
|
cell, class breaks and legend from the aggregated cells), dynamic sizing, glow (between
|
|
47
47
|
`glowlower` and `glowupper`),
|
|
48
48
|
multi-point grouping, on-bubble value labels, `NORMALIZE`, chart boxes (`BOX`, `CIRCULARBOX`)
|
|
49
|
-
with the item title above or below (`TITLE`, `BOTTOMTITLE`), between `boxlower` and `boxupper
|
|
49
|
+
with the item title above or below (`TITLE`, `BOTTOMTITLE`), between `boxlower` and `boxupper`.
|
|
50
|
+
A `CATEGORICAL` `BUBBLE` (also `EXACT`/`AGGREGATE`) is filled and outlined as in flat, each
|
|
51
|
+
bubble and each part of a grouped one: `fillopacity` (1), outlined in the category color × 0.7
|
|
52
|
+
or `linecolor` (none with `NOLINES`), `linewidth` (0.1) growing with √radius (`OUTLINE`: up to the
|
|
53
|
+
normal radius), the outline opaque with `linecolor`/`OUTLINE` or below fillopacity 0.5, else 0.3
|
|
50
54
|
- **CHART\|LABEL** — flat's value label: a rounded box sized by the bubble radius of the size value
|
|
51
55
|
in the item color, with `VALUES` the value in bold; with `TEXTONLY` only the text, over a halo of
|
|
52
56
|
the theme color
|
|
@@ -66,7 +70,32 @@ page. It currently implements:
|
|
|
66
70
|
the parts' sum), `SORT`, `SYMMETRIC`/`BIGTOTOP`, `HALF*`, `AUTOCOMPLETE`, `CENTER` (the center
|
|
67
71
|
part as a disc, `GLOW`), `CENTERVALUE`, `VALUES` (flat's leader-line labels; one part: inside),
|
|
68
72
|
`THIN`/`XTHIN`/`THICK` donuts. `3D`, `VOLUME`, `STARBURST`, `RAYS`/`FLOWER`, `BOW`, `ZOOM` are
|
|
69
|
-
noted in the console and drawn as a flat pie
|
|
73
|
+
noted in the console and drawn as a flat pie. `AGGREGATE` and `CATEGORICAL` (`EXACT`) pies: a pie
|
|
74
|
+
per position (or aggregation grid cell, `RELOCATE`), a slice per category of the value field
|
|
75
|
+
(`style.values`; other values count in the pie's size only) or per value field, slices summed
|
|
76
|
+
(`SUM`, `MAX`/`MIN`, `MEAN`, `FIRST`/`LAST`, `AUTO100`), sized by the summed size field, legend
|
|
77
|
+
rows summed per category; `GRIDSIZE`, `AUTOSIZE`, `DOPACITY`, the chart box/title and field100
|
|
78
|
+
arithmetic on them are noted in the console, not ported
|
|
79
|
+
- **CHART\|VECTOR / CHART\|BEZIER** — flow lines from an item's position to its second one
|
|
80
|
+
(`binding.position2` / `style.lookupfield2`: a key joined to the FEATURE shapes like `position`,
|
|
81
|
+
or `"lat|lon"` fields), per record or `AGGREGATE`d per origin–destination pair (`SUM`, `MAX`,
|
|
82
|
+
`MIN`), as flat draws them: BEZIER's curve (`rangescale` bow, `SHORT`, `GAP`, `REVERSE`,
|
|
83
|
+
`RANDOM`), width by the size (`sizepow`, `normalsizevalue`) or `linewidth`, `POINTER`/`ARROW`
|
|
84
|
+
heads (`markersize`), `GRADIENT`/`FADEIN`, `DOPACITY`/`DOPACITYMIN`, static `DASH` dashes; colored
|
|
85
|
+
by `linecolor`, `colorfield` or the `CATEGORICAL`/`EXACT` category; densified, so they follow the
|
|
86
|
+
globe. `VALUES` text along the curve, `DYNAMICWIDTH`, `LONG` and the dash animation are noted in
|
|
87
|
+
the console, not drawn
|
|
88
|
+
- **CHART\|BAR** (and `BARS`) — a bar chart per record or, with `AGGREGATE`/`CATEGORICAL`, per
|
|
89
|
+
item (aggregated as the pies), a bar per value field or category, as flat draws it: width and
|
|
90
|
+
length by `SIZE` (size field or the values' sum, `sizepow`), `normalsizevalue`, `rangescale`,
|
|
91
|
+
`COMPRESS`/`EXPAND`; `HORZ` (to the right, the first bar on top), `STACKED` (one column, values on
|
|
92
|
+
leader lines with their share), `SORT`, `UP`, `CENTER`, `SPACED`, `THIN`/`THICK`, `NOZERO`,
|
|
93
|
+
`NONEGATIVE`/`ONLYNEGATIVE`, `LEFT`; negative bars; `POINTER`/`ARROW` pointers (sized by the
|
|
94
|
+
value with `SIZE`, negative ones pointing down in `fadenegative`), `OFFSETMEAN`/`OFFSETMEDIAN`/
|
|
95
|
+
`DEVIATION`; `VALUES` (beyond the bar or inside it, `valuedecimals`, `units`, `DTEXT`,
|
|
96
|
+
`VALUEBACKGROUND`/`CTEXT`), `FADEIN`/`FADENEGATIVE`, `fillopacity`/`linecolor`/`linewidth`;
|
|
97
|
+
`BOX` and `TITLE`. `3D`, `VOLUME`, `COLUMN`, `DOTTED`, `TRENDLINE`, the `XAXIS` labels, `ZOOM` and
|
|
98
|
+
field100 arithmetic are noted in the console and drawn as plain bars (`SMALLARROW` as `ARROW`)
|
|
70
99
|
- **DOT** — the simplest base symbol (fixed-radius, unclustered points)
|
|
71
100
|
- **PLOT** — a small line/area chart per item over its value fields (flat's per-item PLOT
|
|
72
101
|
geometry: first point at the item, `scale`/`rangescale`, FIXSIZE markers), or one per grid
|
|
@@ -82,8 +111,8 @@ page. It currently implements:
|
|
|
82
111
|
`window.__setFacetFilter`) for building filterable sidebars
|
|
83
112
|
- Globe (orthographic) projection alongside flat Mercator
|
|
84
113
|
|
|
85
|
-
Not yet implemented: plain (non-AGGREGATE) `CATEGORICAL` choropleths, and the `QUAD
|
|
86
|
-
`WAFFLE
|
|
114
|
+
Not yet implemented: plain (non-AGGREGATE) `CATEGORICAL` choropleths, and the `QUAD`/
|
|
115
|
+
`WAFFLE` base types, and SYMBOL shape variants beyond
|
|
87
116
|
circle/square/diamond/triangle. See the top-of-file comment in
|
|
88
117
|
[`ixmaps-gl.js`](./ixmaps-gl.js) for the exact, currently-accurate scope note.
|
|
89
118
|
|
|
@@ -150,9 +179,17 @@ Zoom numbers in the ixmaps API are ixmaps-flat's, i.e. Leaflet's (256px tiles):
|
|
|
150
179
|
works on 512px tiles, so ixmaps-gl shows ixmaps zoom *z* at MapLibre zoom *z* − 1 — the
|
|
151
180
|
same area a flat page shows. Map scales (`aggregation`, `valueupper`, `featureupper`/`featurelower`
|
|
152
181
|
and `boxupper`/`boxlower` thresholds, `normalSizeScale`) are computed from the zoom that is
|
|
153
|
-
actually displayed
|
|
182
|
+
actually displayed; the `normalSizeScale` option key is matched in any spelling
|
|
183
|
+
(`normalsizescale`), as flat does. Code that talks
|
|
154
184
|
to the MapLibre map directly (`api.map.getZoom()`, `jumpTo`) sees MapLibre zooms.
|
|
155
185
|
|
|
186
|
+
Flat's Equal Earth and Winkel world maps (`map: ".../generic/equalearth.svg"`, `winkel.svg`) are
|
|
187
|
+
drawn in Mercator, but framed and scaled as flat shows them: flat fits its Leaflet view's bounds
|
|
188
|
+
into the projected map, so the same zoom shows a different area there (Equal Earth at zoom 2:
|
|
189
|
+
1.55× the Mercator scale). ixmaps-gl converts every API zoom to the MapLibre zoom with the same
|
|
190
|
+
pixels per degree of longitude at the view's center, and back, and sizes dynamically scaled
|
|
191
|
+
symbols (`objectscaling: "dynamic"`) from flat's own map scale for that map file.
|
|
192
|
+
|
|
156
193
|
### Theme normalization
|
|
157
194
|
|
|
158
195
|
Every layer definition passes through one pure function, `normalizeTheme()`, before any
|
|
@@ -249,7 +286,7 @@ of your own project files gl can render.
|
|
|
249
286
|
Load the engine from jsDelivr, pinned to a release tag (or `@main` for the latest commit):
|
|
250
287
|
|
|
251
288
|
```html
|
|
252
|
-
<script src="https://cdn.jsdelivr.net/gh/gjrichter/ixmaps-gl@v0.2.
|
|
289
|
+
<script src="https://cdn.jsdelivr.net/gh/gjrichter/ixmaps-gl@v0.2.21/ixmaps-gl.js"></script>
|
|
253
290
|
```
|
|
254
291
|
|
|
255
292
|
or from unpkg, the npm package [`ixmaps-gl`](https://www.npmjs.com/package/ixmaps-gl)
|
|
@@ -257,13 +294,13 @@ or from unpkg, the npm package [`ixmaps-gl`](https://www.npmjs.com/package/ixmap
|
|
|
257
294
|
browser script, which defines the global `ixmaps`):
|
|
258
295
|
|
|
259
296
|
```html
|
|
260
|
-
<script src="https://unpkg.com/ixmaps-gl@0.2.
|
|
297
|
+
<script src="https://unpkg.com/ixmaps-gl@0.2.21/ixmaps-gl.js"></script>
|
|
261
298
|
```
|
|
262
299
|
|
|
263
300
|
or use a local copy (`<script src="ixmaps-gl.js"></script>`). A minimal page:
|
|
264
301
|
|
|
265
302
|
```html
|
|
266
|
-
<script src="https://cdn.jsdelivr.net/gh/gjrichter/ixmaps-gl@v0.2.
|
|
303
|
+
<script src="https://cdn.jsdelivr.net/gh/gjrichter/ixmaps-gl@v0.2.21/ixmaps-gl.js"></script>
|
|
267
304
|
<div id="map_div" style="position:absolute;inset:0;"></div>
|
|
268
305
|
|
|
269
306
|
<script>
|