Georeferencing API
    Preparing search index...

    Function attachLeaflet

    • Attach owned image, marker, residual, draft and reference layers and interactions to an existing Leaflet map. Prefer leaflet with the React Georeferencer.

      Leaflet places image overlays as rectangles in the map CRS, so the controller renders previews in that CRS (map.options.crs.code, Web Mercator by default) while the binding is attached; fitting and exports keep using the working CRS. Maps with a custom Proj4Leaflet CRS need its definition in definitions; L.CRS.Simple is not supported. The binding has no capture: Leaflet renders tiles as DOM images, so PDF reports omit the map page. Drawing uses the optional terra-draw and terra-draw-leaflet-adapter peers, loaded on first use.

      Parameters

      • map: Map

        Host-owned Leaflet map.

      • controller: GeoreferencerController

        Authoritative editor store.

      • options: LeafletOptions

        The Leaflet module plus references, projections, snapping and framing.

      Returns MapBinding

      The binding; detach removes everything it added.