Projections

geo.projection picks how the sphere gets flattened. ApexMaps wraps d3-geo rather than reimplementing spherical math, and defaults to Equal Earth rather than Web Mercator, because a world thematic map in Mercator overstates high-latitude area by an order of magnitude, exactly wrong when area encodes a value.

geo: { projection: 'equalEarth' }                          // name
geo: { projection: { name: 'mercator', rotate: [-100, 0] } }  // spec object

Switching projection reprojects the geometry once and refits the view. Panning and zooming afterward never reproject.

Built-in projections

ApexMaps registers 16 distinct projections under 20 names, a few carry aliases for the names developers arriving from tile-based libraries or GIS tooling reach for.

NameAliasesFamily
equalEarthPseudo-cylindrical, equal-area. Default
mercatorwebMercator, epsg:3857Cylindrical, conformal
equirectangularplateCarree, epsg:4326Cylindrical, raw lon/lat
naturalEarthPseudo-cylindrical, compromise
orthographicAzimuthal, the globe view
albersConic, equal-area
albersUsaComposite conic, insets Alaska and Hawaii
conicConformalConic, conformal
conicEqualAreaConic, equal-area
conicEquidistantConic, equidistant
azimuthalEqualAreaAzimuthal, equal-area
azimuthalEquidistantAzimuthal, equidistant
gnomonicAzimuthal, great circles as straight lines
stereographicAzimuthal, conformal
transverseMercatorCylindrical, rotated 90°
identityPassthrough, for already-projected or pixel-space input

All 16 are free in every license tier, including Community. ApexMaps.listProjections() returns every registered name, built-in and custom.

Spec objects

Pass an object instead of a bare name to rotate, recenter, or clip a projection:

geo: {
  projection: { name: 'conicEqualArea', rotate: [-100, 0], parallels: [50, 70] }
}
FieldApplies toPurpose
rotatemost projections[lambda, phi] or [lambda, phi, gamma] in degrees. How a Pacific-centered world, or a country crossing the antimeridian, gets drawn without tearing
centermost projections[lon, lat] to center on
parallelsthe three conic projectionsStandard parallels
angleprojections that support itPost-projection rotation, in degrees
clipAngleazimuthal and related projectionsAntipodal clipping angle
clipExtentany projectionA [[x0, y0], [x1, y1]] world-space clip rectangle
reflectX, reflectYany projectionMirror an axis

albersUsa is a fixed composite of three sub-projections (the continental US, an inset Alaska, an inset Hawaii), so rotate and center are ignored for it: mutating either would break the composite layout. Every other field on the spec still applies.

Only orthographic, gnomonic, stereographic, the azimuthal pair, albersUsa, identity, and the conics show a single hemisphere or region rather than the whole sphere, which is why geo.sphere and geo.graticule are most useful with the others.

Premium feature

Custom projections is a Premium feature

Available on the Premium and OEM plans. Registering your own projection works without a key for evaluation, with a watermark on the map; call ApexMaps.setLicense(key) to remove it.

Registering a custom projection

The 16 built-in projections cover what d3-geo itself ships. Everything else, Mollweide, Robinson, Winkel Tripel, Eckert, Bonne, and the rest of d3-geo-projection, is registered by hand:

import ApexMaps from 'apexmaps'
import { geoRobinson } from 'd3-geo-projection'

ApexMaps.registerProjection('robinson', geoRobinson)

const map = new ApexMaps(el, {
  geo: { map: 'world/countries@110m', projection: 'robinson' },
  series: [{ joinBy: 'iso_a3', data }],
})

registerProjection() itself is free, so is every one of the 16 built-ins. What is licensed is rendering a map with a projection you registered: it works without a key for evaluation, with a watermark, exactly like the other licensed features. Re-registering a built-in name over the built-in (registering your own 'mercator' factory, say) stays free, since the gate is on the name asked for, not on how many custom factories are in the registry.

ApexMaps.registerProjection(name, factory) takes a name and a zero-argument factory returning a d3-geo-style projection, the same shape every built-in uses internally.