Skip to content

Commit

Permalink
feat(SebmGoogleMap): support mapTypeControl
Browse files Browse the repository at this point in the history
Closes #612
  • Loading branch information
TSHiYK authored and sebholstein committed Sep 9, 2016
1 parent 19951f3 commit 28ec00c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/core/directives/google-map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import {PolylineManager} from '../services/managers/polyline-manager';
'longitude', 'latitude', 'zoom', 'draggable: mapDraggable', 'disableDoubleClickZoom',
'disableDefaultUI', 'scrollwheel', 'backgroundColor', 'draggableCursor', 'draggingCursor',
'keyboardShortcuts', 'zoomControl', 'styles', 'usePanning', 'streetViewControl', 'fitBounds',
'scaleControl'
'scaleControl', 'mapTypeControl'
],
outputs: [
'mapClick', 'mapRightClick', 'mapDblClick', 'centerChange', 'idle', 'boundsChange', 'zoomChange'
Expand Down Expand Up @@ -165,12 +165,17 @@ export class SebmGoogleMap implements OnChanges, OnInit {
*/
scaleControl: boolean = false;

/**
* The initial enabled/disabled state of the Map type control.
*/
mapTypeControl: boolean = false;

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

private _observableSubscriptions: Subscription[] = [];
Expand Down Expand Up @@ -235,7 +240,8 @@ export class SebmGoogleMap implements OnChanges, OnInit {
zoomControl: this.zoomControl,
styles: this.styles,
streetViewControl: this.streetViewControl,
scaleControl: this.scaleControl
scaleControl: this.scaleControl,
mapTypeControl: this.mapTypeControl
});

// register event listeners
Expand Down
1 change: 1 addition & 0 deletions src/core/services/google-maps-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ export interface MapOptions {
styles?: MapTypeStyle[];
streetViewControl?: boolean;
scaleControl?: boolean;
mapTypeControl?: boolean;
}

export interface MapTypeStyle {
Expand Down

0 comments on commit 28ec00c

Please sign in to comment.