Skip to content

Commit 28ec00c

Browse files
TSHiYKsebholstein
authored andcommitted
feat(SebmGoogleMap): support mapTypeControl
Closes #612
1 parent 19951f3 commit 28ec00c

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

src/core/directives/google-map.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ import {PolylineManager} from '../services/managers/polyline-manager';
4343
'longitude', 'latitude', 'zoom', 'draggable: mapDraggable', 'disableDoubleClickZoom',
4444
'disableDefaultUI', 'scrollwheel', 'backgroundColor', 'draggableCursor', 'draggingCursor',
4545
'keyboardShortcuts', 'zoomControl', 'styles', 'usePanning', 'streetViewControl', 'fitBounds',
46-
'scaleControl'
46+
'scaleControl', 'mapTypeControl'
4747
],
4848
outputs: [
4949
'mapClick', 'mapRightClick', 'mapDblClick', 'centerChange', 'idle', 'boundsChange', 'zoomChange'
@@ -165,12 +165,17 @@ export class SebmGoogleMap implements OnChanges, OnInit {
165165
*/
166166
scaleControl: boolean = false;
167167

168+
/**
169+
* The initial enabled/disabled state of the Map type control.
170+
*/
171+
mapTypeControl: boolean = false;
172+
168173
/**
169174
* Map option attributes that can change over time
170175
*/
171176
private static _mapOptionsAttributes: string[] = [
172177
'disableDoubleClickZoom', 'scrollwheel', 'draggable', 'draggableCursor', 'draggingCursor',
173-
'keyboardShortcuts', 'zoomControl', 'styles', 'streetViewControl', 'zoom'
178+
'keyboardShortcuts', 'zoomControl', 'styles', 'streetViewControl', 'zoom', 'mapTypeControl'
174179
];
175180

176181
private _observableSubscriptions: Subscription[] = [];
@@ -235,7 +240,8 @@ export class SebmGoogleMap implements OnChanges, OnInit {
235240
zoomControl: this.zoomControl,
236241
styles: this.styles,
237242
streetViewControl: this.streetViewControl,
238-
scaleControl: this.scaleControl
243+
scaleControl: this.scaleControl,
244+
mapTypeControl: this.mapTypeControl
239245
});
240246

241247
// register event listeners

src/core/services/google-maps-types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ export interface MapOptions {
131131
styles?: MapTypeStyle[];
132132
streetViewControl?: boolean;
133133
scaleControl?: boolean;
134+
mapTypeControl?: boolean;
134135
}
135136

136137
export interface MapTypeStyle {

0 commit comments

Comments
 (0)