OptionalcaptureFreeze 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.
OptionalinlineEmbed the result of map.getStyle() in the export instead of relying on
the original style URL. Useful when the style is not publicly reachable.
OptionallogPrint 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.
OptionalmaplibreVersion of MapLibre GL JS the exported page should load from unpkg. Defaults to the version of the library the recorder is attached to.
OptionalmaxLongest pause, in milliseconds, that the exported script waits between two calls. Longer gaps in the recording are shortened to this.
OptionalmaxStop recording once this many operations have been captured, to bound memory usage.
OptionalrecordRecord map events (load, moveend, error, ...) as timeline
annotations. They are never executed, only written into the exported
script as comments.
OptionalrecordRecord the source text of function arguments, e.g. a transformRequest
callback. Set to false if your callbacks contain secrets.
OptionalrecordReconstruct 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.
OptionalrecordKeep the calls MapLibre makes into itself. They are stored for context but never written into the exported script.
Options accepted by Recorder.attach.