/** * 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 {SebmGoogleMapRouter} from '../directives/google-map-router'; import {GoogleMapsAPIWrapper} from './google-maps-api-wrapper'; @Injectable() export class RouterManager { constructor(private _mapsWrapper: GoogleMapsAPIWrapper) {} addRoute(router: SebmGoogleMapRouter) { this._mapsWrapper.createRoute( {origin: router.origin, destination: router.destination, waypoints: router.waypoints}); } updateRoute(router: SebmGoogleMapRouter) { this._mapsWrapper.createRoute( {origin: router.origin, destination: router.destination, waypoints: router.waypoints}); } }