Creates a new instance of the given layer type.
The "type"
option is mandatory and specifies which layer type to create.
The other configuration options may be dependent on the specific layer type.
Example:
import { SimpleLayer } from "@open-pioneer/map";
const layerFactory = ...; // injected
const layer = layerFactory.create({
type: SimpleLayer,
title: "Layer title",
olLayer: new TileLayer({}),
// ... other options
});
Creates instances of layer classes.
Use the interface
"map.LayerFactory"
to obtain an instance of this service.