Skip to content

Commit

Permalink
fix(google-maps): fix event listeners
Browse files Browse the repository at this point in the history
fixes #999
  • Loading branch information
ihadeed committed Jan 24, 2017
1 parent 93fdb7e commit 416071a
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/plugins/googlemap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ export class GoogleMap {
addEventListener(eventName: string): Observable<any> {
return new Observable(
(observer) => {
this._objectInstance.addEventListener(event, observer.next.bind(observer));
return () => this._objectInstance.removeEventListener(event, observer.next.bind(observer));
this._objectInstance.addEventListener(eventName, observer.next.bind(observer));
return () => this._objectInstance.removeEventListener(eventName, observer.next.bind(observer));
}
);
}
Expand Down Expand Up @@ -633,8 +633,8 @@ export class GoogleMapsMarker {
addEventListener(eventName: string): Observable<any> {
return new Observable(
(observer) => {
this._objectInstance.addEventListener(event, observer.next.bind(observer));
return () => this._objectInstance.removeEventListener(event, observer.next.bind(observer));
this._objectInstance.addEventListener(eventName, observer.next.bind(observer));
return () => this._objectInstance.removeEventListener(eventName, observer.next.bind(observer));
}
);
}
Expand Down Expand Up @@ -913,8 +913,8 @@ export class GoogleMapsCircle {
addEventListener(eventName: string): Observable<any> {
return new Observable(
(observer) => {
this._objectInstance.addEventListener(event, observer.next.bind(observer));
return () => this._objectInstance.removeEventListener(event, observer.next.bind(observer));
this._objectInstance.addEventListener(eventName, observer.next.bind(observer));
return () => this._objectInstance.removeEventListener(eventName, observer.next.bind(observer));
}
);
}
Expand Down Expand Up @@ -1057,8 +1057,8 @@ export class GoogleMapsPolyline {
addEventListener(eventName: string): Observable<any> {
return new Observable(
(observer) => {
this._objectInstance.addEventListener(event, observer.next.bind(observer));
return () => this._objectInstance.removeEventListener(event, observer.next.bind(observer));
this._objectInstance.addEventListener(eventName, observer.next.bind(observer));
return () => this._objectInstance.removeEventListener(eventName, observer.next.bind(observer));
}
);
}
Expand Down Expand Up @@ -1202,8 +1202,8 @@ export class GoogleMapsPolygon {
addEventListener(eventName: string): Observable<any> {
return new Observable(
(observer) => {
this._objectInstance.addEventListener(event, observer.next.bind(observer));
return () => this._objectInstance.removeEventListener(event, observer.next.bind(observer));
this._objectInstance.addEventListener(eventName, observer.next.bind(observer));
return () => this._objectInstance.removeEventListener(eventName, observer.next.bind(observer));
}
);
}
Expand Down Expand Up @@ -1349,8 +1349,8 @@ export class GoogleMapsTileOverlay {
addEventListener(eventName: string): Observable<any> {
return new Observable(
(observer) => {
this._objectInstance.addEventListener(event, observer.next.bind(observer));
return () => this._objectInstance.removeEventListener(event, observer.next.bind(observer));
this._objectInstance.addEventListener(eventName, observer.next.bind(observer));
return () => this._objectInstance.removeEventListener(eventName, observer.next.bind(observer));
}
);
}
Expand Down Expand Up @@ -1483,8 +1483,8 @@ export class GoogleMapsGroundOverlay {
addEventListener(eventName: string): Observable<any> {
return new Observable(
(observer) => {
this._objectInstance.addEventListener(event, observer.next.bind(observer));
return () => this._objectInstance.removeEventListener(event, observer.next.bind(observer));
this._objectInstance.addEventListener(eventName, observer.next.bind(observer));
return () => this._objectInstance.removeEventListener(eventName, observer.next.bind(observer));
}
);
}
Expand Down Expand Up @@ -1608,8 +1608,8 @@ export class GoogleMapsKmlOverlay {
addEventListener(eventName: string): Observable<any> {
return new Observable(
(observer) => {
this._objectInstance.addEventListener(event, observer.next.bind(observer));
return () => this._objectInstance.removeEventListener(event, observer.next.bind(observer));
this._objectInstance.addEventListener(eventName, observer.next.bind(observer));
return () => this._objectInstance.removeEventListener(eventName, observer.next.bind(observer));
}
);
}
Expand Down

0 comments on commit 416071a

Please sign in to comment.