Skip to content

Commit

Permalink
feat(SebmGoogleMap): support zoomControl opt
Browse files Browse the repository at this point in the history
Closes #237
  • Loading branch information
sebholstein committed Mar 21, 2016
1 parent 1a14570 commit a5b909a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/directives/google-map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {MouseEvent} from '../events';
providers: [GoogleMapsAPIWrapper, MarkerManager],
inputs: [
'longitude', 'latitude', 'zoom', 'disableDoubleClickZoom', 'disableDefaultUI', 'scrollwheel',
'backgroundColor', 'draggableCursor', 'draggingCursor', 'keyboardShortcuts'
'backgroundColor', 'draggableCursor', 'draggingCursor', 'keyboardShortcuts', 'zoomControl'
],
outputs: ['mapClick', 'mapRightClick', 'mapDblClick', 'centerChange'],
host: {'[class.sebm-google-map-container]': 'true'},
Expand Down Expand Up @@ -98,12 +98,17 @@ export class SebmGoogleMap implements OnChanges,
*/
keyboardShortcuts: boolean = true;

/**
* The enabled/disabled state of the Zoom control.
*/
zoomControl: boolean = true;

/**
* Map option attributes that can change over time
*/
private static _mapOptionsAttributes: string[] = [
'disableDoubleClickZoom', 'scrollwheel', 'draggableCursor', 'draggingCursor',
'keyboardShortcuts'
'keyboardShortcuts', 'zoomControl'
];

/**
Expand Down Expand Up @@ -145,7 +150,8 @@ export class SebmGoogleMap implements OnChanges,
backgroundColor: this.backgroundColor,
draggableCursor: this.draggableCursor,
draggingCursor: this.draggingCursor,
keyboardShortcuts: this.keyboardShortcuts
keyboardShortcuts: this.keyboardShortcuts,
zoomControl: this.zoomControl
});
this._handleMapCenterChange();
this._handleMapZoomChange();
Expand Down
1 change: 1 addition & 0 deletions src/services/google-maps-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,5 @@ export interface MapOptions {
draggableCursor?: string;
draggingCursor?: string;
keyboardShortcuts?: boolean;
zoomControl?: boolean;
}

0 comments on commit a5b909a

Please sign in to comment.