Skip to content
This repository was archived by the owner on Jun 23, 2025. It is now read-only.

Commit 468a1a8

Browse files
committed
feat(SebmGoogleMap): support scaleControl option
Closes #502
1 parent e913394 commit 468a1a8

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

src/core/directives/google-map.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import {MarkerManager} from '../services/managers/marker-manager';
4040
inputs: [
4141
'longitude', 'latitude', 'zoom', 'disableDoubleClickZoom', 'disableDefaultUI', 'scrollwheel',
4242
'backgroundColor', 'draggableCursor', 'draggingCursor', 'keyboardShortcuts', 'zoomControl',
43-
'styles', 'usePanning', 'streetViewControl', 'fitBounds'
43+
'styles', 'usePanning', 'streetViewControl', 'fitBounds', 'scaleControl'
4444
],
4545
outputs: ['mapClick', 'mapRightClick', 'mapDblClick', 'centerChange', 'idle', 'boundsChange'],
4646
host: {'[class.sebm-google-map-container]': 'true'},
@@ -150,6 +150,11 @@ export class SebmGoogleMap implements OnChanges, OnInit {
150150
*/
151151
fitBounds: LatLngBoundsLiteral|LatLngBounds = null;
152152

153+
/**
154+
* The initial enabled/disabled state of the Scale control. This is disabled by default.
155+
*/
156+
scaleControl: boolean = false;
157+
153158
/**
154159
* Map option attributes that can change over time
155160
*/
@@ -213,7 +218,8 @@ export class SebmGoogleMap implements OnChanges, OnInit {
213218
keyboardShortcuts: this.keyboardShortcuts,
214219
zoomControl: this.zoomControl,
215220
styles: this.styles,
216-
streetViewControl: this.streetViewControl
221+
streetViewControl: this.streetViewControl,
222+
scaleControl: this.scaleControl
217223
});
218224

219225
// register event listeners

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ export interface MapOptions {
123123
zoomControl?: boolean;
124124
styles?: MapTypeStyle[];
125125
streetViewControl?: boolean;
126+
scaleControl?: boolean;
126127
}
127128

128129
export interface MapTypeStyle {

0 commit comments

Comments
 (0)