NextGIS Frontend
    Preparing search index...

    Interface RasterAdapterOptions

    Parameters that can be used to create any map layer adapter.

    interface RasterAdapterOptions {
        adapter?: string;
        attribution?: string;
        baselayer?: boolean;
        crossOrigin?: "anonymous";
        fit?: boolean;
        headers?: Record<string, any>;
        id?: string;
        layers?: string;
        maxScale?: number;
        maxZoom?: number;
        minScale?: number;
        minZoom?: number;
        name?: string;
        nativeOptions?: Record<string, any>;
        onAdded?: (layer: LayerAdapter) => void;
        opacity?: null | number;
        order?: number;
        props?: Record<string, any>;
        ratio?: number;
        setViewDelay?: number;
        srs?: number;
        subdomains?: string | string[];
        type?: VectorAdapterLayerType;
        url: string;
        visibility?: boolean;
        waitFullLoad?: boolean;
        withCredentials?: boolean;
    }

    Hierarchy (View Summary)

    Index

    Properties

    adapter?: string
    attribution?: string

    String to be shown in the attribution control. It describes the layer data and is often a legal obligation towards copyright holders and tile providers.

    baselayer?: boolean

    Indicate on a cartographic base layer.

    crossOrigin?: "anonymous"

    Parameter added when forming a request for layer data. This is needed if you want to access tile pixel data. Refer to CORS Settings for valid String values.

    fit?: boolean

    Fit map to layer extent

    false
    
    headers?: Record<string, any>
    id?: string

    Unique Layer ID. If not specified, will be added automatically.

    If the layer adapter is asynchronous, its id will be assigned only after the promise is resolved. While adapter is loading, methods for obtaining layers will ignore the added layer.

    layers?: string
    maxScale?: number

    TODO: replace by maxZoom

    use maxZoom instead

    maxZoom?: number

    Maximum zoom level of the map.

    minScale?: number

    TODO: replace by minZoom

    use minZoom instead

    minZoom?: number

    Minimum zoom level of the map.

    name?: string

    Non-unique name of the layer. Can be used for user interfaces.

    nativeOptions?: Record<string, any>

    Map and layer adapter base options Use with care. There may be a conflict in the addLayer method by the adapter of the NextGIS Frontend library

    onAdded?: (layer: LayerAdapter) => void
    opacity?: null | number

    Layer transparency. From 0-transparent to 1-visible

    1
    
    order?: number

    Indicates the map layers display sequence. A layer with a larger order value overlaps smaller ones. Zero value used to indicate baselayer. If the value is not specified explicitly, it will be assigned automatically with an increase of one for each new layer.

    props?: Record<string, any>

    Any properties to save in layer. May be useful to get additional info from layer event.

    ratio?: number
    setViewDelay?: number

    Experimental option to set the map loading delay when changing position

    srs?: number

    Experimental only for Ol yet

    subdomains?: string | string[]

    Type for geometries painting, for each layer may be only one of: point, polygon or line.

    url: string
    visibility?: boolean

    Show layer on the map immediately after adding. Such layers are always under others. Only one base layer can be displayed on the map at a time.

    TODO: replace by show

    true
    
    waitFullLoad?: boolean

    Wait until the layer data is fully loaded before allowing added to the map.

    If true, addLayer promise resolve only after data loading. This is useful for GeoJson vector layer adapters when you need to process downloaded data before displaying.

    withCredentials?: boolean