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

Commit 9960522

Browse files
demianhsebholstein
authored andcommitted
feat(SebmGoogleMap): Add attribute „clickableIcons“ to map
1 parent 119dfa2 commit 9960522

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

src/core/directives/map.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ import {DataLayerManager} from './../services/managers/data-layer-manager';
4949
'draggingCursor', 'keyboardShortcuts', 'zoomControl', 'zoomControlOptions', 'styles', 'usePanning',
5050
'streetViewControl', 'streetViewControlOptions', 'fitBounds', 'mapTypeControl', 'mapTypeControlOptions',
5151
'panControlOptions', 'rotateControl', 'rotateControlOptions', 'fullscreenControl', 'fullscreenControlOptions',
52-
'scaleControl', 'scaleControlOptions', 'mapTypeId'
52+
'scaleControl', 'scaleControlOptions', 'mapTypeId', 'clickableIcons'
5353
],
5454
outputs: [
5555
'mapClick', 'mapRightClick', 'mapDblClick', 'centerChange', 'idle', 'boundsChange', 'zoomChange'
@@ -246,6 +246,12 @@ export class AgmMap implements OnChanges, OnInit, OnDestroy {
246246
*/
247247
mapTypeId: 'roadmap'|'hybrid'|'satellite'|'terrain'|string = 'roadmap';
248248

249+
/**
250+
* When false, map icons are not clickable. A map icon represents a point of interest,
251+
* also known as a POI. By default map icons are clickable.
252+
*/
253+
clickableIcons: boolean = true;
254+
249255
/**
250256
* Map option attributes that can change over time
251257
*/
@@ -255,7 +261,7 @@ export class AgmMap implements OnChanges, OnInit, OnDestroy {
255261
'streetViewControlOptions', 'zoom', 'mapTypeControl', 'mapTypeControlOptions', 'minZoom',
256262
'maxZoom', 'panControl', 'panControlOptions', 'rotateControl', 'rotateControlOptions',
257263
'fullscreenControl', 'fullscreenControlOptions', 'scaleControl', 'scaleControlOptions',
258-
'mapTypeId'
264+
'mapTypeId', 'clickableIcons'
259265
];
260266

261267
private _observableSubscriptions: Subscription[] = [];
@@ -336,7 +342,8 @@ export class AgmMap implements OnChanges, OnInit, OnDestroy {
336342
rotateControlOptions: this.rotateControlOptions,
337343
fullscreenControl: this.fullscreenControl,
338344
fullscreenControlOptions: this.fullscreenControlOptions,
339-
mapTypeId: this.mapTypeId
345+
mapTypeId: this.mapTypeId,
346+
clickableIcons: this.clickableIcons
340347
});
341348

342349
// register event listeners

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ export interface MapOptions {
147147
fullscreenControl?: boolean;
148148
fullscreenControlOptions?: FullscreenControlOptions;
149149
mapTypeId?: string|MapTypeId;
150+
clickableIcons?: boolean;
150151
}
151152

152153
export interface MapTypeStyle {

0 commit comments

Comments
 (0)