File

src/lib/services/managers/info-window.manager.ts

Index

Properties
Methods

Constructor

constructor(_mapsWrapper: MapsApiWrapper, _zone: NgZone, _markerManager: MarkerManager)
Parameters :
Name Type Optional
_mapsWrapper MapsApiWrapper No
_zone NgZone No
_markerManager MarkerManager No

Methods

Public Abstract addInfoWindow
addInfoWindow(infoWindow: NgMapsInfoWindowComponent)
Parameters :
Name Type Optional
infoWindow NgMapsInfoWindowComponent No
Returns : Promise<void>
Public Abstract close
close(infoWindow: NgMapsInfoWindowComponent)
Parameters :
Name Type Optional
infoWindow NgMapsInfoWindowComponent No
Returns : void
Public Abstract createEventObservable
createEventObservable(eventName: string, infoWindow: NgMapsInfoWindowComponent)
Type parameters :
  • E

Creates a Google Maps event listener for the given InfoWindow as an Observable

Parameters :
Name Type Optional
eventName string No
infoWindow NgMapsInfoWindowComponent No
Returns : Observable<E>
Public Abstract deleteInfoWindow
deleteInfoWindow(infoWindow: NgMapsInfoWindowComponent)
Parameters :
Name Type Optional
infoWindow NgMapsInfoWindowComponent No
Returns : Promise<void>
Public Abstract open
open(infoWindow: NgMapsInfoWindowComponent, event?: any)
Parameters :
Name Type Optional
infoWindow NgMapsInfoWindowComponent No
event any Yes
Returns : Promise<void>
Public Abstract setOptions
setOptions(infoWindow: NgMapsInfoWindowComponent, options: google.maps.InfoWindowOptions)
Parameters :
Name Type Optional
infoWindow NgMapsInfoWindowComponent No
options google.maps.InfoWindowOptions No
Returns : Promise | void
Public Abstract setPosition
setPosition(infoWindow: NgMapsInfoWindowComponent)
Parameters :
Name Type Optional
infoWindow NgMapsInfoWindowComponent No
Returns : void
Public Abstract setZIndex
setZIndex(infoWindow: NgMapsInfoWindowComponent)
Parameters :
Name Type Optional
infoWindow NgMapsInfoWindowComponent No
Returns : void

Properties

Protected _infoWindows
Type : Map<NgMapsInfoWindowComponent | T>
Default value : new Map()
import { Injectable, NgZone } from '@angular/core';
import { Observable } from 'rxjs';

import { NgMapsInfoWindowComponent } from '../../directives/info-window';
import { MapsApiWrapper } from '../maps-api-wrapper';

import { MarkerManager } from './marker.manager';

@Injectable()
export abstract class InfoWindowManager<T> {
  protected _infoWindows: Map<NgMapsInfoWindowComponent, T> = new Map();

  constructor(
    protected _mapsWrapper: MapsApiWrapper,
    protected _zone: NgZone,
    protected _markerManager: MarkerManager,
  ) {}

  public abstract deleteInfoWindow(
    infoWindow: NgMapsInfoWindowComponent,
  ): Promise<void>;

  public abstract setPosition(infoWindow: NgMapsInfoWindowComponent): void;

  public abstract setZIndex(infoWindow: NgMapsInfoWindowComponent): void;

  public abstract open(
    infoWindow: NgMapsInfoWindowComponent,
    event?: any,
  ): Promise<void>;

  public abstract close(infoWindow: NgMapsInfoWindowComponent): void;

  public abstract setOptions(
    infoWindow: NgMapsInfoWindowComponent,
    options: google.maps.InfoWindowOptions,
  ): Promise<void> | void;

  public abstract addInfoWindow(
    infoWindow: NgMapsInfoWindowComponent,
  ): Promise<void>;

  /**
   * Creates a Google Maps event listener for the given InfoWindow as an Observable
   */
  public abstract createEventObservable<E>(
    eventName: string,
    infoWindow: NgMapsInfoWindowComponent,
  ): Observable<E>;
}

results matching ""

    No results matching ""