Skip to content

Commit 1dad7b2

Browse files
committed
docs: Add world transform examples (canvas and projection) similar to US
1 parent 4390a0b commit 1dad7b2

18 files changed

Lines changed: 221 additions & 7 deletions

docs/src/examples/catalog/Chart.json

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1986,6 +1986,20 @@
19861986
"lineNumber": 49,
19871987
"line": "<Chart"
19881988
},
1989+
{
1990+
"example": "transform-world-canvas",
1991+
"component": "GeoPath",
1992+
"path": "/docs/components/GeoPath/transform-world-canvas",
1993+
"lineNumber": 48,
1994+
"line": "<Chart"
1995+
},
1996+
{
1997+
"example": "transform-world-projection",
1998+
"component": "GeoPath",
1999+
"path": "/docs/components/GeoPath/transform-world-projection",
2000+
"lineNumber": 63,
2001+
"line": "<Chart"
2002+
},
19892003
{
19902004
"example": "translucent-globe",
19912005
"component": "GeoPath",
@@ -3667,5 +3681,5 @@
36673681
"line": "<Chart {data} x=\"x\" y=\"y\" height={400}>"
36683682
}
36693683
],
3670-
"updatedAt": "2026-03-26T17:40:19.994Z"
3684+
"updatedAt": "2026-03-27T02:41:20.665Z"
36713685
}

docs/src/examples/catalog/GeoPath.json

Lines changed: 107 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,70 @@
449449
}
450450
]
451451
},
452+
{
453+
"name": "transform-world-canvas",
454+
"title": "transform world canvas",
455+
"path": "/docs/components/GeoPath/transform-world-canvas",
456+
"components": [
457+
{
458+
"component": "Chart",
459+
"lineNumber": 48,
460+
"line": "<Chart"
461+
},
462+
{
463+
"component": "Layer",
464+
"lineNumber": 65,
465+
"line": "<Layer>"
466+
},
467+
{
468+
"component": "GeoPath",
469+
"lineNumber": 66,
470+
"line": "<GeoPath geojson={{ type: 'Sphere' }} class=\"fill-blue-400/50\" />"
471+
},
472+
{
473+
"component": "Graticule",
474+
"lineNumber": 67,
475+
"line": "<Graticule class=\"stroke-surface-content/20\" strokeWidth={1 / context.transform.scale} />"
476+
},
477+
{
478+
"component": "Tooltip",
479+
"lineNumber": 116,
480+
"line": "<Tooltip.Root>"
481+
}
482+
]
483+
},
484+
{
485+
"name": "transform-world-projection",
486+
"title": "transform world projection",
487+
"path": "/docs/components/GeoPath/transform-world-projection",
488+
"components": [
489+
{
490+
"component": "Chart",
491+
"lineNumber": 63,
492+
"line": "<Chart"
493+
},
494+
{
495+
"component": "Layer",
496+
"lineNumber": 80,
497+
"line": "<Layer>"
498+
},
499+
{
500+
"component": "GeoPath",
501+
"lineNumber": 81,
502+
"line": "<GeoPath geojson={{ type: 'Sphere' }} class=\"fill-blue-400/50\" />"
503+
},
504+
{
505+
"component": "Graticule",
506+
"lineNumber": 82,
507+
"line": "<Graticule class=\"stroke-surface-content/20\" />"
508+
},
509+
{
510+
"component": "Tooltip",
511+
"lineNumber": 134,
512+
"line": "<Tooltip.Root>"
513+
}
514+
]
515+
},
452516
{
453517
"name": "translucent-globe",
454518
"title": "translucent globe",
@@ -953,6 +1017,48 @@
9531017
"lineNumber": 113,
9541018
"line": "<GeoPath"
9551019
},
1020+
{
1021+
"example": "transform-world-canvas",
1022+
"component": "GeoPath",
1023+
"path": "/docs/components/GeoPath/transform-world-canvas",
1024+
"lineNumber": 66,
1025+
"line": "<GeoPath geojson={{ type: 'Sphere' }} class=\"fill-blue-400/50\" />"
1026+
},
1027+
{
1028+
"example": "transform-world-canvas",
1029+
"component": "GeoPath",
1030+
"path": "/docs/components/GeoPath/transform-world-canvas",
1031+
"lineNumber": 70,
1032+
"line": "<GeoPath"
1033+
},
1034+
{
1035+
"example": "transform-world-canvas",
1036+
"component": "GeoPath",
1037+
"path": "/docs/components/GeoPath/transform-world-canvas",
1038+
"lineNumber": 108,
1039+
"line": "<GeoPath"
1040+
},
1041+
{
1042+
"example": "transform-world-projection",
1043+
"component": "GeoPath",
1044+
"path": "/docs/components/GeoPath/transform-world-projection",
1045+
"lineNumber": 81,
1046+
"line": "<GeoPath geojson={{ type: 'Sphere' }} class=\"fill-blue-400/50\" />"
1047+
},
1048+
{
1049+
"example": "transform-world-projection",
1050+
"component": "GeoPath",
1051+
"path": "/docs/components/GeoPath/transform-world-projection",
1052+
"lineNumber": 85,
1053+
"line": "<GeoPath"
1054+
},
1055+
{
1056+
"example": "transform-world-projection",
1057+
"component": "GeoPath",
1058+
"path": "/docs/components/GeoPath/transform-world-projection",
1059+
"lineNumber": 127,
1060+
"line": "<GeoPath"
1061+
},
9561062
{
9571063
"example": "translucent-globe",
9581064
"component": "GeoPath",
@@ -1234,5 +1340,5 @@
12341340
"line": "<GeoPath"
12351341
}
12361342
],
1237-
"updatedAt": "2026-03-24T16:00:55.347Z"
1343+
"updatedAt": "2026-03-26T19:56:41.830Z"
12381344
}

docs/src/examples/catalog/Graticule.json

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,20 @@
9898
"lineNumber": 51,
9999
"line": "<Graticule class=\"stroke-surface-content/20\" />"
100100
},
101+
{
102+
"example": "transform-world-canvas",
103+
"component": "GeoPath",
104+
"path": "/docs/components/GeoPath/transform-world-canvas",
105+
"lineNumber": 67,
106+
"line": "<Graticule class=\"stroke-surface-content/20\" strokeWidth={1 / context.transform.scale} />"
107+
},
108+
{
109+
"example": "transform-world-projection",
110+
"component": "GeoPath",
111+
"path": "/docs/components/GeoPath/transform-world-projection",
112+
"lineNumber": 82,
113+
"line": "<Graticule class=\"stroke-surface-content/20\" />"
114+
},
101115
{
102116
"example": "translucent-globe",
103117
"component": "GeoPath",
@@ -155,5 +169,5 @@
155169
"line": "<Graticule class=\"stroke-surface-content/10\" />"
156170
}
157171
],
158-
"updatedAt": "2026-03-24T16:00:55.453Z"
172+
"updatedAt": "2026-03-26T19:56:43.290Z"
159173
}

docs/src/examples/catalog/Layer.json

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1808,6 +1808,34 @@
18081808
"lineNumber": 111,
18091809
"line": "<Layer pointerEvents={false}>"
18101810
},
1811+
{
1812+
"example": "transform-world-canvas",
1813+
"component": "GeoPath",
1814+
"path": "/docs/components/GeoPath/transform-world-canvas",
1815+
"lineNumber": 65,
1816+
"line": "<Layer>"
1817+
},
1818+
{
1819+
"example": "transform-world-canvas",
1820+
"component": "GeoPath",
1821+
"path": "/docs/components/GeoPath/transform-world-canvas",
1822+
"lineNumber": 106,
1823+
"line": "<Layer pointerEvents={false}>"
1824+
},
1825+
{
1826+
"example": "transform-world-projection",
1827+
"component": "GeoPath",
1828+
"path": "/docs/components/GeoPath/transform-world-projection",
1829+
"lineNumber": 80,
1830+
"line": "<Layer>"
1831+
},
1832+
{
1833+
"example": "transform-world-projection",
1834+
"component": "GeoPath",
1835+
"path": "/docs/components/GeoPath/transform-world-projection",
1836+
"lineNumber": 125,
1837+
"line": "<Layer pointerEvents={false}>"
1838+
},
18111839
{
18121840
"example": "translucent-globe",
18131841
"component": "GeoPath",
@@ -3552,5 +3580,5 @@
35523580
"line": "<Layer onpointermove={onPointerMove}>"
35533581
}
35543582
],
3555-
"updatedAt": "2026-03-26T17:40:21.577Z"
3583+
"updatedAt": "2026-03-27T02:41:21.677Z"
35563584
}

docs/src/examples/catalog/Tooltip.json

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4190,6 +4190,48 @@
41904190
"lineNumber": 128,
41914191
"line": "<Tooltip.Item label=\"latitude\" value={latitude} format=\"decimal\" />"
41924192
},
4193+
{
4194+
"example": "transform-world-canvas",
4195+
"component": "GeoPath",
4196+
"path": "/docs/components/GeoPath/transform-world-canvas",
4197+
"lineNumber": 116,
4198+
"line": "<Tooltip.Root>"
4199+
},
4200+
{
4201+
"example": "transform-world-projection",
4202+
"component": "GeoPath",
4203+
"path": "/docs/components/GeoPath/transform-world-projection",
4204+
"lineNumber": 134,
4205+
"line": "<Tooltip.Root>"
4206+
},
4207+
{
4208+
"example": "transform-world-projection",
4209+
"component": "GeoPath",
4210+
"path": "/docs/components/GeoPath/transform-world-projection",
4211+
"lineNumber": 138,
4212+
"line": "<Tooltip.Header>{data.properties.name}</Tooltip.Header>"
4213+
},
4214+
{
4215+
"example": "transform-world-projection",
4216+
"component": "GeoPath",
4217+
"path": "/docs/components/GeoPath/transform-world-projection",
4218+
"lineNumber": 139,
4219+
"line": "<Tooltip.List>"
4220+
},
4221+
{
4222+
"example": "transform-world-projection",
4223+
"component": "GeoPath",
4224+
"path": "/docs/components/GeoPath/transform-world-projection",
4225+
"lineNumber": 140,
4226+
"line": "<Tooltip.Item label=\"longitude\" value={longitude} format=\"decimal\" />"
4227+
},
4228+
{
4229+
"example": "transform-world-projection",
4230+
"component": "GeoPath",
4231+
"path": "/docs/components/GeoPath/transform-world-projection",
4232+
"lineNumber": 141,
4233+
"line": "<Tooltip.Item label=\"latitude\" value={latitude} format=\"decimal\" />"
4234+
},
41934235
{
41944236
"example": "translucent-globe",
41954237
"component": "GeoPath",
@@ -6319,5 +6361,5 @@
63196361
"line": "<Tooltip.Item label=\"Direction\" value={data.angle} format=\"decimal\" />"
63206362
}
63216363
],
6322-
"updatedAt": "2026-03-26T17:40:25.924Z"
6364+
"updatedAt": "2026-03-27T02:41:22.659Z"
63236365
}
17.7 KB
Loading
38.2 KB
Loading
71.6 KB
Loading
19.3 KB
Loading
43.2 KB
Loading

0 commit comments

Comments
 (0)