maplibregl-recorder
    Preparing search index...

    Type Alias RecorderOptions

    Options accepted by Recorder.attach.

    type RecorderOptions = {
        captureElementStyles?: boolean;
        inlineStyle?: boolean;
        logCalls?: boolean;
        maplibreVersion?: string;
        maxDelay?: number;
        maxOps?: number;
        recordEvents?: boolean;
        recordFunctions?: boolean;
        recordGestures?: boolean;
        recordNestedCalls?: boolean;
    }
    Index
    captureElementStyles?: boolean

    Freeze the computed CSS of custom marker and popup elements into inline styles, so they look the same in a reproduction that does not have the host page stylesheet.

    true
    
    inlineStyle?: boolean

    Embed the result of map.getStyle() in the export instead of relying on the original style URL. Useful when the style is not publicly reachable.

    false
    
    logCalls?: boolean

    Print every entry to the console as it is recorded, one line each, with the calls MapLibre made into itself indented under the call that caused them. Useful for seeing what is being captured without exporting first.

    It can be turned on and off while recording, and the whole timeline can be printed at any time - see Recorder.logCalls and Recorder.print.

    false
    
    maplibreVersion?: string

    Version of MapLibre GL JS the exported page should load from unpkg. Defaults to the version of the library the recorder is attached to.

    maxDelay?: number

    Longest pause, in milliseconds, that the exported script waits between two calls. Longer gaps in the recording are shortened to this.

    4000
    
    maxOps?: number

    Stop recording once this many operations have been captured, to bound memory usage.

    20000
    
    recordEvents?: boolean

    Record map events (load, moveend, error, ...) as timeline annotations. They are never executed, only written into the exported script as comments.

    true
    
    recordFunctions?: boolean

    Record the source text of function arguments, e.g. a transformRequest callback. Set to false if your callbacks contain secrets.

    true
    
    recordGestures?: boolean

    Reconstruct pans, zooms and rotations the user made by hand.

    A gesture is a stream of pointer events, not a call, so there is nothing to record. What the recorder can do is read the camera once the map settles and write a jumpTo that lands in the same place - so the reproduction carries on from where the person was looking, instead of from wherever the last flyTo left it.

    It is a reconstruction, not a recording: the path is lost, only the destination survives, and the exported script says so.

    true
    
    recordNestedCalls?: boolean

    Keep the calls MapLibre makes into itself. They are stored for context but never written into the exported script.

    true