MaplibreInspectOptions: {
    assignLayerColor?: (layerId: string, alpha: number) => string;
    backgroundColor?: string;
    blockHoverPopupOnClick?: boolean;
    buildInspectStyle?: (
        originalMapStyle: StyleSpecification,
        coloredLayers: LayerSpecification[],
        opts: { backgroundColor?: string },
    ) => StyleSpecification;
    popup?: Popup;
    queryParameters?: QueryRenderedFeaturesOptions;
    renderPopup?: (
        features: GeoJSONFeatureWithSourceLayer[],
    ) => string | HTMLElement;
    selectThreshold?: number;
    showInspectButton?: boolean;
    showInspectMap?: boolean;
    showInspectMapPopup?: boolean;
    showInspectMapPopupOnHover?: boolean;
    showMapPopup?: boolean;
    showMapPopupOnHover?: boolean;
    sources?: { [key: string]: string[] };
    toggleCallback?: (showInspectMap: boolean) => void;
    useInspectStyle?: boolean;
}

This is the main type for the available options for MapLibre Inspect

Type declaration

  • OptionalassignLayerColor?: (layerId: string, alpha: number) => string
  • OptionalbackgroundColor?: string

    Background color for the inspect map

    '#fff'
    
  • OptionalblockHoverPopupOnClick?: boolean

    Block hover popup on click

    false
    
  • OptionalbuildInspectStyle?: (
        originalMapStyle: StyleSpecification,
        coloredLayers: LayerSpecification[],
        opts: { backgroundColor?: string },
    ) => StyleSpecification
  • Optionalpopup?: Popup

    Maplibre GL Popup

  • OptionalqueryParameters?: QueryRenderedFeaturesOptions

    Query parameters for querying rendered features

  • OptionalrenderPopup?: (features: GeoJSONFeatureWithSourceLayer[]) => string | HTMLElement
  • OptionalselectThreshold?: number

    Select threshold

    5
    
  • OptionalshowInspectButton?: boolean

    Show the inspect button

    true
    
  • OptionalshowInspectMap?: boolean

    Show the inspect map

    false
    
  • OptionalshowInspectMapPopup?: boolean

    Show the inspect map popup

    true
    
  • OptionalshowInspectMapPopupOnHover?: boolean

    Show the inspect map popup on hover

    true
    
  • OptionalshowMapPopup?: boolean

    Show the map popup

    false
    
  • OptionalshowMapPopupOnHover?: boolean

    Show the map popup on hover

    true
    
  • Optionalsources?: { [key: string]: string[] }

    Sources to be used for inspecting, setting this will disable the automatic source detection. This is a dictionary containing the source IDs and their vector layer IDs

  • OptionaltoggleCallback?: (showInspectMap: boolean) => void

    Callback for toggling the inspect map

  • OptionaluseInspectStyle?: boolean

    Use inspect style

    true
    
MMNEPVFCICPMFPCPTTAAATR