UNPKG

mmr-gl-react

Version:

React components for MMR GL JS-compatible libraries

10 lines (9 loc) 811 B
import type { MapInstance, MapStyle, Callbacks } from '../types'; import type Mmr from './mmr'; /** These methods may break the react binding if called directly */ declare const skipMethods: readonly ["setMaxBounds", "setMinZoom", "setMaxZoom", "setMinPitch", "setMaxPitch", "setRenderWorldCopies", "setProjection", "setStyle", "addSource", "removeSource", "addLayer", "removeLayer", "setLayerZoomRange", "setFilter", "setPaintProperty", "setLayoutProperty", "setLight", "setTerrain", "setFog", "remove"]; export type MapRef<MapT extends MapInstance> = { getMap(): MapT; } & Omit<MapT, typeof skipMethods[number]>; export default function createRef<StyleT extends MapStyle, CallbacksT extends Callbacks, MapT extends MapInstance>(mapInstance: Mmr<StyleT, CallbacksT, MapT>): MapRef<MapT> | null; export {};