OptionaladvancedAdvanced 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
targetbecause the target is controlled by the<MapContainer />.
OptionalbaseConfigures 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.
OptionalinitialConfigures the initial view. This can be an extent, or a (center, zoom) value.
OptionallayersConfigures 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.
OptionalprojectionConfigures 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"
OptionalshowWhether 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.
OptionaltopmostConfigures 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.
Options supported during map construction.