/** * ng2-gm - Angular 2 components for Google Maps * @version v0.0.2 * @link https://github.com/williampaulo/angular2-google-maps#readme * @license MIT */ import {Injectable} from '@angular/core'; import {SebmGoogleMapRouterPanel} from '../directives/google-map-router-panel'; import {GoogleMapsAPIWrapper} from './google-maps-api-wrapper'; @Injectable() export class RouterPanelManager { constructor(private _mapsWrapper: GoogleMapsAPIWrapper) {} init(routePanel: SebmGoogleMapRouterPanel) { this._mapsWrapper.infoPanel(routePanel.content); } show(routePanel: SebmGoogleMapRouterPanel) { routePanel.showInfoPanel = true; } hide(routePanel: SebmGoogleMapRouterPanel) { routePanel.showInfoPanel = false; } update(routePanel: SebmGoogleMapRouterPanel) { this._mapsWrapper.infoPanel(routePanel.content); } }