mgl-map - The main map component

Map

...
@Component({
template: `
<mgl-map
[style]="'https://demotiles.maplibre.org/style.json'"
[zoom]="[9]"
[center]="[-74.50, 40]"
(mapLoad)="map = $event"
></mgl-map>
`,
...
})
export class DisplayMapComponent {
map: Map; // MapLibre GL Map object (MapLibre is ran outside angular zone, keep that in mind when binding events from this object)
...
}

Implements

Constructors

Properties

antialias: InputSignal<undefined | boolean> = ...

Init input

attributionControl: InputSignal<undefined | false | AttributionControlOptions> = ...

Init input

bearing: InputSignal<undefined | [number]> = ...

Dynamic input

bearingSnap: InputSignal<undefined | number> = ...

Init input

bounds: InputSignal<undefined | LngLatBoundsLike> = ...

Init input

boxZoom: InputSignal<undefined | boolean> = ...

Dynamic input

boxZoomCancel: OutputEmitterRef<MapLibreZoomEvent & EventData> = ...
boxZoomEnd: OutputEmitterRef<MapLibreZoomEvent & EventData> = ...
boxZoomStart: OutputEmitterRef<MapLibreZoomEvent & EventData> = ...
center: InputSignal<undefined | LngLatLike> = ...

Dynamic input

centerWithPanTo: InputSignal<undefined | boolean> = ...
clickTolerance: InputSignal<undefined | number> = ...

Init input

collectResourceTiming: InputSignal<undefined | boolean> = ...

Init input

cooperativeGestures: InputSignal<undefined | boolean> = ...

Init input

crossSourceCollisions: InputSignal<undefined | boolean> = ...

Init input

cursorStyle: InputSignal<undefined | string> = ...
customMapboxApiUrl: InputSignal<undefined | string> = ...

Init input

data: OutputEmitterRef<MapDataEvent & EventData> = ...
dataLoading: OutputEmitterRef<MapDataEvent & EventData> = ...
doubleClickZoom: InputSignal<undefined | boolean> = ...

Dynamic input

dragPan: InputSignal<undefined | boolean | DragPanOptions> = ...

Dynamic input

dragRotate: InputSignal<undefined | boolean> = ...

Dynamic input

fadeDuration: InputSignal<undefined | number> = ...

Init input

failIfMajorPerformanceCaveat: InputSignal<undefined | boolean> = ...

Init input

fitBounds: InputSignal<undefined | LngLatBoundsLike> = ...
fitBoundsOptions: InputSignal<undefined | FitBoundsOptions> = ...

Dynamic input

fitScreenCoordinates: InputSignal<undefined | [PointLike, PointLike]> = ...
hash: InputSignal<undefined | string | boolean> = ...

Init input

idle: OutputEmitterRef<MapLibreEvent & EventData> = ...
interactive: InputSignal<undefined | boolean> = ...

Init input

keyboard: InputSignal<undefined | boolean> = ...

Dynamic input

localIdeographFontFamily: InputSignal<undefined | string | false> = ...

Init input

locale: InputSignal<any> = ...

Init input

logoPosition: InputSignal<undefined | ControlPosition> = ...

Init input

mapClick: OutputEmitterRef<MapMouseEvent & EventData> = ...
mapContainer: Signal<ElementRef<HTMLDivElement>> = ...
mapContextMenu: OutputEmitterRef<MapMouseEvent & EventData> = ...
mapDblClick: OutputEmitterRef<MapMouseEvent & EventData> = ...
mapDrag: OutputEmitterRef<MapLibreEvent<undefined | MouseEvent | TouchEvent> & EventData> = ...
mapDragEnd: OutputEmitterRef<MapLibreEvent<undefined | MouseEvent | TouchEvent> & EventData> = ...
mapDragStart: OutputEmitterRef<MapLibreEvent<undefined | MouseEvent | TouchEvent> & EventData> = ...
mapError: OutputEmitterRef<ErrorEvent & EventData> = ...
mapLoad: OutputEmitterRef<Map$1> = ...
mapMouseDown: OutputEmitterRef<MapMouseEvent & EventData> = ...
mapMouseMove: OutputEmitterRef<MapMouseEvent & EventData> = ...
mapMouseOut: OutputEmitterRef<MapMouseEvent & EventData> = ...
mapMouseOver: OutputEmitterRef<MapMouseEvent & EventData> = ...
mapMouseUp: OutputEmitterRef<MapMouseEvent & EventData> = ...
mapRemove: OutputEmitterRef<MapLibreEvent & EventData> = ...
mapResize: OutputEmitterRef<MapLibreEvent & EventData> = ...
mapTouchCancel: OutputEmitterRef<MapTouchEvent & EventData> = ...
mapTouchEnd: OutputEmitterRef<MapTouchEvent & EventData> = ...
mapTouchMove: OutputEmitterRef<MapTouchEvent & EventData> = ...
mapTouchStart: OutputEmitterRef<MapTouchEvent & EventData> = ...
mapWheel: OutputEmitterRef<MapWheelEvent & EventData> = ...
maxBounds: InputSignal<undefined | LngLatBoundsLike> = ...

Dynamic input

maxPitch: InputSignal<undefined | null | number> = ...

Dynamic input

maxTileCacheSize: InputSignal<undefined | null | number> = ...

Init input

maxZoom: InputSignal<undefined | null | number> = ...

Dynamic input

minPitch: InputSignal<undefined | null | number> = ...

Dynamic input

minZoom: InputSignal<undefined | null | number> = ...

Dynamic input

move: OutputEmitterRef<MapLibreEvent<
    | undefined
    | MouseEvent
    | TouchEvent
    | WheelEvent> & EventData> = ...
moveEnd: OutputEmitterRef<MapLibreEvent<
    | undefined
    | MouseEvent
    | TouchEvent
    | WheelEvent> & EventData> = ...
moveStart: OutputEmitterRef<MapLibreEvent<
    | undefined
    | MouseEvent
    | TouchEvent
    | WheelEvent> & EventData> = ...
movingMethod: InputSignal<"jumpTo" | "easeTo" | "flyTo"> = ...

Added by ngx-mapbox-gl

movingOptions: InputSignal<undefined | MovingOptions> = ...
panToOptions: InputSignal<undefined | AnimationOptions> = ...
pitch: InputSignal<undefined | [number]> = ...

Dynamic input

pitchEnd: OutputEmitterRef<MapLibreEvent<undefined | MouseEvent | TouchEvent> & EventData> = ...
pitchEvt: OutputEmitterRef<MapLibreEvent<undefined | MouseEvent | TouchEvent> & EventData> = ...
pitchStart: OutputEmitterRef<MapLibreEvent<undefined | MouseEvent | TouchEvent> & EventData> = ...
pitchWithRotate: InputSignal<undefined | boolean> = ...

Init input

preserveDrawingBuffer: InputSignal<undefined | boolean> = ...

Init input

refreshExpiredTiles: InputSignal<undefined | boolean> = ...

Init input

render: OutputEmitterRef<MapLibreEvent & EventData> = ...
renderWorldCopies: InputSignal<undefined | boolean> = ...

Dynamic input

rotate: OutputEmitterRef<MapLibreEvent<undefined | MouseEvent | TouchEvent> & EventData> = ...
rotateEnd: OutputEmitterRef<MapLibreEvent<undefined | MouseEvent | TouchEvent> & EventData> = ...
rotateStart: OutputEmitterRef<MapLibreEvent<undefined | MouseEvent | TouchEvent> & EventData> = ...
scrollZoom: InputSignal<undefined | boolean | AroundCenterOptions> = ...

Dynamic input

sourceData: OutputEmitterRef<MapLibreEvent<unknown> & {
    dataType: "source";
    isSourceLoaded: boolean;
    source: SourceSpecification;
    sourceDataType: MapSourceDataType;
    sourceId: string;
    tile: any;
} & EventData> = ...
sourceDataLoading: OutputEmitterRef<MapLibreEvent<unknown> & {
    dataType: "source";
    isSourceLoaded: boolean;
    source: SourceSpecification;
    sourceDataType: MapSourceDataType;
    sourceId: string;
    tile: any;
} & EventData> = ...
style: InputSignal<undefined | string | StyleSpecification> = ...

Dynamic input

styleData: OutputEmitterRef<MapLibreEvent<unknown> & {
    dataType: "style";
} & EventData> = ...
styleDataLoading: OutputEmitterRef<MapLibreEvent<unknown> & {
    dataType: "style";
} & EventData> = ...
styleImageMissing: OutputEmitterRef<{
    id: string;
} & EventData> = ...
terrain: InputSignal<undefined | TerrainSpecification> = ...

Dynamic input

touchPitch: InputSignal<undefined | boolean | AroundCenterOptions> = ...

Dynamic input

touchZoomRotate: InputSignal<undefined | boolean | AroundCenterOptions> = ...

Dynamic input

trackResize: InputSignal<undefined | boolean> = ...

Init input

transformRequest: InputSignal<undefined | null | RequestTransformFunction> = ...

Init input

webGlContextLost: OutputEmitterRef<MapContextEvent & EventData> = ...
webGlContextRestored: OutputEmitterRef<MapContextEvent & EventData> = ...
zoom: InputSignal<undefined | [number]> = ...

Dynamic input

zoomEnd: OutputEmitterRef<MapLibreEvent<
    | undefined
    | MouseEvent
    | TouchEvent
    | WheelEvent> & EventData> = ...
zoomEvt: OutputEmitterRef<MapLibreEvent<
    | undefined
    | MouseEvent
    | TouchEvent
    | WheelEvent> & EventData> = ...
zoomStart: OutputEmitterRef<MapLibreEvent<
    | undefined
    | MouseEvent
    | TouchEvent
    | WheelEvent> & EventData> = ...

Accessors

Methods

  • A callback method that is invoked immediately after the default change detector has checked data-bound properties if at least one has changed, and before the view and content children are checked.

    Parameters

    • changes: SimpleChanges

      The changed properties.

    Returns Promise<void>