maplibre-xy

Utilities for maplibre-gl-js to improve flat single-copy maps, 'simple' maps, and non-maps like high-resolution image tilesets.

Source on GitHub with install instructions and examples.

Underzoom

View the entire bounded map by extending the zoom and pan with Underzoom.transformConstrain.

    import { Underzoom } from 'maplibre-xy';  // npm i maplibre-xy
    import { Underzoom } from 'https://unpkg.com/maplibre-xy';  // CDN

    const myUnderzoom = new Underzoom(maplibregl);

    const map = new maplibregl.Map({
        transformConstrain: myUnderzoom.transformConstrain,
        ...
    });