Function ensurePmtilesProtocol

  • Register the pmtiles:// protocol on MapLibre if it has not been registered already. Idempotent: repeated calls (including from multiple maps loading concurrently) share a single registration and a single in-flight import.

    Returns once the protocol is registered so callers can await it before handing a pmtiles://-referencing style to map.setStyle.

    Parameters

    Returns Promise<void>