POLAR reference
    Preparing search index...

    Interface MapConfiguration

    The mapConfiguration allows controlling many client instance details.

    interface MapConfiguration {
        layers: LayerConfiguration[];
        startCenter: [number, number];
        checkServiceAvailability?: boolean;
        colorScheme?: ColorScheme;
        epsg?: `EPSG:${string}`;
        extent?: [number, number, number, number];
        featureStyles?: string;
        footer?: FooterPluginOptions;
        fullscreen?: FullscreenPluginOptions;
        geoLocation?: GeoLocationPluginOptions;
        iconMenu?: IconMenuPluginOptions;
        language?: InitialLanguage;
        layout?: "standard" | "nineRegions" | VueElement;
        loadingIndicator?: LoadingIndicatorOptions;
        locales?: LocaleOverride[];
        markers?: MarkerConfiguration;
        namedProjections?: [string, string][];
        oidcToken?: string;
        options?: PolarMapOptions[];
        pins?: PinsPluginOptions;
        reverseGeocoder?: ReverseGeocoderPluginOptions;
        secureServiceUrlRegex?: RegExp;
        startResolution?: number;
        theme?: PolarTheme;
        toast?: ToastPluginOptions;
    }

    Hierarchy (View Summary)

    Index

    Properties

    Configuration of layers that are supposed to be used in the respective client. All layers defined here have to have an entry in the serviceRegister parameter of createMap. If @polar/plugin-layer-chooser is installed and configured, all these layers will be displayed in that menu.

    layers: [
    {
    id: 'basemap',
    name: 'Basemap Grayscale',
    },
    {
    id: 'my-wfs',
    name: 'My WFS service',
    },
    ]
    startCenter: [number, number]

    Initial center coordinate. Coordinate needs to be defined in the chosen leading coordinate system configured by mapConfiguration.epsg.

    startCenter: [553655.72, 6004479.25]
    
    checkServiceAvailability?: boolean

    If set to true, all services' availability will be checked with head requests.

    colorScheme?: ColorScheme

    Color scheme the client should be using. If set to system, the color scheme is chosen according to the user's system preferences.

    'system'

    epsg?: `EPSG:${string}`

    Leading coordinate system. The coordinate system has to be defined in mapConfiguration.namedProjections as well. Changing this value should also lead to changes in mapConfiguration.startCenter, mapConfiguration.extent, mapConfiguration.options and mapConfiguration.startResolution as they are described in or are related to the leading coordinate system.

    'EPSG:25832'

    epsg: 'EPSG:4326'
    
    extent?: [number, number, number, number]

    Map movement will be restricted to the rectangle described by the given coordinates. Unrestricted by default. Coordinates need to be defined in the chosen leading coordinate system configured by mapConfiguration.epsg.

    extent: [426205.6233, 5913461.9593, 650128.6567, 6101486.8776]
    
    featureStyles?: string

    Optional path to define styles for vector features. The parameter may be a url or a path on the local file system. See mapConfiguration.featureStyles for more information.

    Configuration for footer plugin.

    Configuration for fullscreen plugin.

    Configuration for geoLocation plugin.

    Configuration for iconMenu plugin.

    language?: InitialLanguage

    The initial language the client should be using.

    'de' (German)

    layout?: "standard" | "nineRegions" | VueElement

    Choose between the standard sidebar layout with fixed positioning, the oldschool nine region layout with full configurability regarding positioning or add a custom layout as Vue component.

    loadingIndicator?: LoadingIndicatorOptions

    Configuration for loadingIndicator plugin.

    locales?: LocaleOverride[]

    All locales in POLAR and its plugins can be overridden to fit your needs. Take a look at the respective documentation for all values that can be overridden.

    A language option is an object consisting of a type (its language key) and the i18next resource definition. You may e.g. decide that the texts offered in the LayerChooser do not fit the style of your client, or that they could be more precise in your situation since you're only using very specific overlays.

    locales: [
    {
    type: 'de',
    resources: {
    layerChooser: {
    maskTitle: 'Bahnstrecken',
    },
    },
    },
    {
    type: 'en',
    resources: {
    layerChooser: {
    maskTitle: 'Railway lines',
    },
    },
    },
    ],

    When reading the locale tables, please mind that the dot notation (a.b.c | value) has to be written as separate keys in nested objects as seen in the example above ({a: {b: {c: "value"}}}).

    If set, all configured visible vector layers' features can be hovered and selected by mouseover and click respectively. They are available as features in the store. Layers with clusterDistance will be clustered to a multi-marker that supports the same features. Please mind that only point marker vector layers are supported. For all other layers, take a look at the configuration of mapConfiguration.featureStyles. Note, that this configuration parameter takes precedence over the configuration of mapConfiguration.featureStyles.

    namedProjections?: [string, string][]

    Array of usable coordinated systems mapped to a projection as a proj4 string. Defines 'EPSG:25832', 'EPSG:3857', 'EPSG:4326', 'EPSG:31467' and 'EPSG:4647' by default. If you set a value, please mind that all pre-configured projections are overridden, and requiring e.g. 'EPSG:4326' will only work if it is also defined in your override.

    namedProjections: [
    [
    'EPSG:25832',
    '+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs',
    ],
    ]
    oidcToken?: string

    If a secured layer is supposed to be visible on start, the token also has to be provided via this configuration parameter. Updates to the token have to be done by updating the store parameter oidcToken.

    options?: PolarMapOptions[]

    Defines all available zoom levels mapped to the respective resolution and related scale. The resolution is dependent on the chosen leading coordinate system configured by mapConfiguration.epsg. Defines 10 zoomLevels for 'EPSG:25832' by default.

    options: [
    { resolution: 66.14579761460263, scale: 250000, zoomLevel: 0 },
    { resolution: 26.458319045841044, scale: 100000, zoomLevel: 1 },
    { resolution: 15.874991427504629, scale: 60000, zoomLevel: 2 },
    { resolution: 10.583327618336419, scale: 40000, zoomLevel: 3 },
    { resolution: 5.2916638091682096, scale: 20000, zoomLevel: 4 },
    { resolution: 2.6458319045841048, scale: 10000, zoomLevel: 5 },
    { resolution: 1.3229159522920524, scale: 5000, zoomLevel: 6 },
    { resolution: 0.6614579761460262, scale: 2500, zoomLevel: 7 },
    { resolution: 0.2645831904584105, scale: 1000, zoomLevel: 8 },
    { resolution: 0.1322915952292052, scale: 500, zoomLevel: 9 },
    ]

    Configuration for pins plugin.

    Configuration for reverseGeocoder plugin.

    secureServiceUrlRegex?: RegExp

    Regular expression defining URLs that belong to secured services. All requests sent to URLs that fit the regular expression will send the JSON Web Token (JWT) found in the store parameter oidcToken as a Bearer token in the Authorization header of the request. Requests already including an Authorization header will keep the already present one.

    startResolution?: number

    Initial resolution; must be described in mapConfiguration.options. Defaults to 15.874991427504629 which is a zoom level defined in the default configuration of mapConfiguration.options.

    15.874991427504629

    startResolution: 264.583190458
    
    theme?: PolarTheme

    Custom theme for POLAR.

    The default is to use KERN's standard theme.

    Configuration for toast plugin.