Skip to content

Commit

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

/**
* Color used for the background of the Map div. This color will be visible when tiles have not
* yet loaded as the user pans. This option can only be set when the map is initialized.
*/
backgroundColor: string;

/**
* Map option attributes that can change over time
*/
Expand Down Expand Up @@ -109,7 +116,8 @@ export class SebmGoogleMap implements OnChanges,
this._mapsWrapper.createMap(el, {
center: {lat: this._latitude, lng: this._longitude},
zoom: this._zoom,
disableDefaultUI: this.disableDefaultUI
disableDefaultUI: this.disableDefaultUI,
backgroundColor: this.backgroundColor
});
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 @@ -58,4 +58,5 @@ export interface MapOptions {
zoom?: number;
disableDoubleClickZoom?: boolean;
disableDefaultUI?: boolean;
backgroundColor?: string;
}

0 comments on commit bda7ca8

Please sign in to comment.