map.computeAdaptiveMapSize
computeAdaptiveMapSize(mode: MapMode): numberCompute a mapSize (planar only) so the geo nodes' geographic bounding box
spans ~TARGET_WORLD_SPAN world units — the scale at which the force
layout's default linkDistance lands non-geo nodes next to their geo
neighbors (like the legacy viewport-scaled map) instead of flinging them to
the horizon. Returns null (→ caller falls back to 10) when there's no
usable geo extent: spherical mode, <2 geo nodes, or all geo at one point.
This scales the PROJECTION, not the force params, so non-map force layout is provably unaffected. Result is clamped to [MIN, MAX] so extreme datasets (a single city, or two antipodal points) don't push tile LOD / camera planes out of range.
mode | MapMode |
Returns: number