SDK JS
    Preparing search index...

    The slice of a MapLibre map the pegman drop needs (structural, for testability).

    interface PegmanMapLike {
        getContainer(): {
            getBoundingClientRect(): {
                bottom: number;
                left: number;
                right: number;
                top: number;
            };
        };
        unproject(point: [number, number]): { lat: number; lng: number };
    }
    Index

    Methods

    • The map's ROOT container — its client rect is the drop target AND the space unproject works in. (NOT the canvas container: maplibre's .maplibregl-canvas-container has absolutely-positioned children and a ZERO-height client rect — hit-testing against it rejects every drop.)

      Returns {
          getBoundingClientRect(): {
              bottom: number;
              left: number;
              right: number;
              top: number;
          };
      }

    • Container-relative pixel → geographic coordinate.

      Parameters

      • point: [number, number]

      Returns { lat: number; lng: number }