Open Pioneer Trails Packages
    Preparing search index...

    Interface MapConfig

    Options supported during map construction.

    interface MapConfig {
        advanced?: Partial<OlMapOptions>;
        baseLayers?: Layer[];
        initialView?: InitialViewConfig;
        layers?: Layer[];
        projection?:
            | "EPSG:3857"
            | "EPSG:4326"
            | "EPSG:25832"
            | "EPSG:25833"
            | string & {};
        showAttributions?: boolean;
        topmostLayers?: Layer[];
    }
    Index
    advanced?: Partial<OlMapOptions>

    Advanced OpenLayers configuration.

    Options in this object are passed to the OlMap's constructor. Other properties defined in this configuration (e.g. initialView) will be applied on top of these map options.

    Warning: Not all properties here are supported. For example, you cannot set the target because the target is controlled by the <MapContainer />.

    baseLayers?: Layer[]

    Configures the base layers of the map.

    Base layers are always displayed below all operational layers. Only one base layer can be active (visible) at a time.

    Note: Prefer this property over the LayerConfig.isBaseLayer property.

    initialView?: InitialViewConfig

    Configures the initial view. This can be an extent, or a (center, zoom) value.

    layers?: Layer[]

    Configures the layers of the map.

    Layer order

    Layers defined in this array are (by default) displayed in their listed order: layers defined first are shown at the bottom, and layers defined at a later position are shown above their predecessors.

    Note: base layers are always shown below all operational layers.

    projection?:
        | "EPSG:3857"
        | "EPSG:4326"
        | "EPSG:25832"
        | "EPSG:25833"
        | string & {}

    Configures a specific projection, e.g. "EPSG:4326". Defaults to EPSG:3857.

    To use custom projections, make sure that they are registered first:

    import { registerProjections } from "@open-pioneer/map";

    // Usually done at the top of the module.
    // This will register the projection(s) in proj4's global registry.
    registerProjections({
    "EPSG:31466": "+proj=tmerc +lat_0=0 +lon_0=6 +k=1 +x_0=2500000 +y_0=0 +ellps=bessel +nadgrids=BETA2007.gsb +units=m +no_defs +type=crs",
    // ... more projections
    });

    // later, use projection: "EPSG:31466"
    showAttributions?: boolean

    Whether to show the default attribution control.

    The default value is true, unless advanced options are defined. The default value changes to false if advanced.controls defined, mostly for backwards compatibility. If showDefaultAttributions is set explicitly to true or false, that value always has precedence.

    NOTE: Disabling the default attribution control typically means that you must render the attributions yourself (see MapModel.attributionItems) to comply with the terms of service of your map services.

    topmostLayers?: Layer[]

    Configures the topmost layers of the map.

    Topmost layers are always displayed above all operational layers and base layers. The order of topmost layers is determined by their order in this array, with layers defined later being displayed above earlier ones.