ixmaps-gl 0.2.19 → 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 +51 -8
- package/ixmaps-gl.js +2986 -74
- 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
|
|
@@ -61,6 +65,37 @@ page. It currently implements:
|
|
|
61
65
|
flat's part sizes, glow and value labels
|
|
62
66
|
- **CHART\|USER** — a page's own chart function (`style.userdraw`: `ixmaps.<name>(SVGDocument, opt)`
|
|
63
67
|
and its `_init`, as flat calls them), drawn in flat's chart units and shown as an icon at flat's size
|
|
68
|
+
- **CHART\|PIE** (and `PIE|DONUT`) — a pie per record (placed on its FEATURE shape by
|
|
69
|
+
`binding.lookup`), a slice per value field, as flat lays them out: `SIZE` by the size field (or
|
|
70
|
+
the parts' sum), `SORT`, `SYMMETRIC`/`BIGTOTOP`, `HALF*`, `AUTOCOMPLETE`, `CENTER` (the center
|
|
71
|
+
part as a disc, `GLOW`), `CENTERVALUE`, `VALUES` (flat's leader-line labels; one part: inside),
|
|
72
|
+
`THIN`/`XTHIN`/`THICK` donuts. `3D`, `VOLUME`, `STARBURST`, `RAYS`/`FLOWER`, `BOW`, `ZOOM` are
|
|
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`)
|
|
64
99
|
- **DOT** — the simplest base symbol (fixed-radius, unclustered points)
|
|
65
100
|
- **PLOT** — a small line/area chart per item over its value fields (flat's per-item PLOT
|
|
66
101
|
geometry: first point at the item, `scale`/`rangescale`, FIXSIZE markers), or one per grid
|
|
@@ -76,8 +111,8 @@ page. It currently implements:
|
|
|
76
111
|
`window.__setFacetFilter`) for building filterable sidebars
|
|
77
112
|
- Globe (orthographic) projection alongside flat Mercator
|
|
78
113
|
|
|
79
|
-
Not yet implemented: plain (non-AGGREGATE) `CATEGORICAL` choropleths, and the `QUAD
|
|
80
|
-
`
|
|
114
|
+
Not yet implemented: plain (non-AGGREGATE) `CATEGORICAL` choropleths, and the `QUAD`/
|
|
115
|
+
`WAFFLE` base types, and SYMBOL shape variants beyond
|
|
81
116
|
circle/square/diamond/triangle. See the top-of-file comment in
|
|
82
117
|
[`ixmaps-gl.js`](./ixmaps-gl.js) for the exact, currently-accurate scope note.
|
|
83
118
|
|
|
@@ -144,9 +179,17 @@ Zoom numbers in the ixmaps API are ixmaps-flat's, i.e. Leaflet's (256px tiles):
|
|
|
144
179
|
works on 512px tiles, so ixmaps-gl shows ixmaps zoom *z* at MapLibre zoom *z* − 1 — the
|
|
145
180
|
same area a flat page shows. Map scales (`aggregation`, `valueupper`, `featureupper`/`featurelower`
|
|
146
181
|
and `boxupper`/`boxlower` thresholds, `normalSizeScale`) are computed from the zoom that is
|
|
147
|
-
actually displayed
|
|
182
|
+
actually displayed; the `normalSizeScale` option key is matched in any spelling
|
|
183
|
+
(`normalsizescale`), as flat does. Code that talks
|
|
148
184
|
to the MapLibre map directly (`api.map.getZoom()`, `jumpTo`) sees MapLibre zooms.
|
|
149
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
|
+
|
|
150
193
|
### Theme normalization
|
|
151
194
|
|
|
152
195
|
Every layer definition passes through one pure function, `normalizeTheme()`, before any
|
|
@@ -243,7 +286,7 @@ of your own project files gl can render.
|
|
|
243
286
|
Load the engine from jsDelivr, pinned to a release tag (or `@main` for the latest commit):
|
|
244
287
|
|
|
245
288
|
```html
|
|
246
|
-
<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>
|
|
247
290
|
```
|
|
248
291
|
|
|
249
292
|
or from unpkg, the npm package [`ixmaps-gl`](https://www.npmjs.com/package/ixmaps-gl)
|
|
@@ -251,13 +294,13 @@ or from unpkg, the npm package [`ixmaps-gl`](https://www.npmjs.com/package/ixmap
|
|
|
251
294
|
browser script, which defines the global `ixmaps`):
|
|
252
295
|
|
|
253
296
|
```html
|
|
254
|
-
<script src="https://unpkg.com/ixmaps-gl@0.2.
|
|
297
|
+
<script src="https://unpkg.com/ixmaps-gl@0.2.21/ixmaps-gl.js"></script>
|
|
255
298
|
```
|
|
256
299
|
|
|
257
300
|
or use a local copy (`<script src="ixmaps-gl.js"></script>`). A minimal page:
|
|
258
301
|
|
|
259
302
|
```html
|
|
260
|
-
<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>
|
|
261
304
|
<div id="map_div" style="position:absolute;inset:0;"></div>
|
|
262
305
|
|
|
263
306
|
<script>
|
|
@@ -288,7 +331,7 @@ features this engine doesn't implement:
|
|
|
288
331
|
|
|
289
332
|
```text
|
|
290
333
|
[ixmaps-gl validate] error unknown-style-key — layer "points": unknown style key "fillOpacity" — did you mean "fillopacity"?
|
|
291
|
-
[ixmaps-gl validate] warning gl-unsupported — layer "
|
|
334
|
+
[ixmaps-gl validate] warning gl-unsupported — layer "waffle": type flag "WAFFLE" is not implemented by ixmaps-gl
|
|
292
335
|
```
|
|
293
336
|
|
|
294
337
|
It is **off by default** — nothing is fetched and nothing changes. Turn it on with any of:
|