export type DegreesPerPixel = Readonly<{ lng: number; lat: number; }>; /** * Degrees of longitude/latitude spanned by a single screen pixel at `zoom`, * near `latitudeDeg`, under Web Mercator. * * Longitude degrees-per-pixel is constant everywhere; latitude degrees-per-pixel * scales by `cos(latitude)` because Mercator stretches higher latitudes. Used to * convert a pixel label footprint into a geo bounding box so collision runs in * the same lng/lat space the marker positions already live in. */ export declare const degreesPerPixel: (zoom: number, latitudeDeg: number) => DegreesPerPixel; export type LabelFootprintDeg = Readonly<{ widthDeg: number; heightDeg: number; }>; export type LabelFootprintParams = Readonly<{ /** Current camera zoom. */ zoom: number; /** Reference latitude (typically the viewport centre) for the lat-per-pixel scale. */ latitudeDeg: number; /** Extra spacing added around every label — the density dial. */ paddingPx: number; }>; /** * Upper-bound label footprint as a geo-space width/height, for collision testing. * * A rendered pill's size does NOT follow the zoom circle-size tier: `MapMarker` * lays every pill out at the fixed {@link MARKER_PILL_CONTENT_LAYOUT_SIZE}, and the * label text is capped at `maxLabelWidthPx` (ellipsis beyond). We size the collision * box to that upper bound — widest pill that can render — so the box is never smaller * than what paints, which is what keeps the "no two labels overlap" guarantee honest. * Density is tuned via `paddingPx`, not by shrinking the box. */ export declare const labelFootprintDeg: ({ zoom, latitudeDeg, paddingPx }: LabelFootprintParams) => LabelFootprintDeg;