Register the new default map widget. If one was previously registered, then it is unregistered.
The following services are registered:
components to register { map, mapWidgetModel, mapWidget }
import { InjectedReference } from "apprt-core/InjectedReference";
import { MapWidgetRegistration } from "map-widget/MapWidgetRegistration";
import MapWidgetFactory from "map-widget/MapWidgetFactory";
class MyComponent {
private _mapregistration: InjectedReference<MapWidgetRegistration>;
private _mapfactory: InjectedReference<MapWidgetFactory>;
activate() {
const mapregistration = this._mapregistration!;
const mapfactory = this._mapfactory!;
const map = mapfactory.createMap({...});
const model = mapfactory.createWidgetModel({map, ...});
const widget = mapfactory.createWidget({model});
mapregistration.register({
map: map,
mapWidgetModel: model,
mapWidget: widget
});
}
}
Registers map-related components as OSGi services.
Use the service
map-widget.MapWidgetRegistration
to inject an instance of this interface.