Skip to content

Commit

Permalink
feat(SebmGoogleMap): Add attribute „clickableIcons“ to map
Browse files Browse the repository at this point in the history
  • Loading branch information
demianh authored and sebholstein committed Mar 26, 2017
1 parent 119dfa2 commit 9960522
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/core/directives/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import {DataLayerManager} from './../services/managers/data-layer-manager';
'draggingCursor', 'keyboardShortcuts', 'zoomControl', 'zoomControlOptions', 'styles', 'usePanning',
'streetViewControl', 'streetViewControlOptions', 'fitBounds', 'mapTypeControl', 'mapTypeControlOptions',
'panControlOptions', 'rotateControl', 'rotateControlOptions', 'fullscreenControl', 'fullscreenControlOptions',
'scaleControl', 'scaleControlOptions', 'mapTypeId'
'scaleControl', 'scaleControlOptions', 'mapTypeId', 'clickableIcons'
],
outputs: [
'mapClick', 'mapRightClick', 'mapDblClick', 'centerChange', 'idle', 'boundsChange', 'zoomChange'
Expand Down Expand Up @@ -246,6 +246,12 @@ export class AgmMap implements OnChanges, OnInit, OnDestroy {
*/
mapTypeId: 'roadmap'|'hybrid'|'satellite'|'terrain'|string = 'roadmap';

/**
* When false, map icons are not clickable. A map icon represents a point of interest,
* also known as a POI. By default map icons are clickable.
*/
clickableIcons: boolean = true;

/**
* Map option attributes that can change over time
*/
Expand All @@ -255,7 +261,7 @@ export class AgmMap implements OnChanges, OnInit, OnDestroy {
'streetViewControlOptions', 'zoom', 'mapTypeControl', 'mapTypeControlOptions', 'minZoom',
'maxZoom', 'panControl', 'panControlOptions', 'rotateControl', 'rotateControlOptions',
'fullscreenControl', 'fullscreenControlOptions', 'scaleControl', 'scaleControlOptions',
'mapTypeId'
'mapTypeId', 'clickableIcons'
];

private _observableSubscriptions: Subscription[] = [];
Expand Down Expand Up @@ -336,7 +342,8 @@ export class AgmMap implements OnChanges, OnInit, OnDestroy {
rotateControlOptions: this.rotateControlOptions,
fullscreenControl: this.fullscreenControl,
fullscreenControlOptions: this.fullscreenControlOptions,
mapTypeId: this.mapTypeId
mapTypeId: this.mapTypeId,
clickableIcons: this.clickableIcons
});

// 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 @@ -147,6 +147,7 @@ export interface MapOptions {
fullscreenControl?: boolean;
fullscreenControlOptions?: FullscreenControlOptions;
mapTypeId?: string|MapTypeId;
clickableIcons?: boolean;
}

export interface MapTypeStyle {
Expand Down

0 comments on commit 9960522

Please sign in to comment.