@@ -38,7 +38,7 @@ let markerId = 0;
3838 selector : 'sebm-google-map-marker' ,
3939 inputs : [
4040 'latitude' , 'longitude' , 'title' , 'label' , 'draggable: markerDraggable' , 'iconUrl' ,
41- 'openInfoWindow' , 'fitBounds'
41+ 'openInfoWindow' , 'fitBounds' , 'opacity'
4242 ] ,
4343 outputs : [ 'markerClick' , 'dragEnd' ]
4444} )
@@ -78,6 +78,11 @@ export class SebmGoogleMapMarker implements OnDestroy, OnChanges, AfterContentIn
7878 */
7979 openInfoWindow : boolean = true ;
8080
81+ /**
82+ * The marker's opacity between 0.0 and 1.0.
83+ */
84+ opacity : number = 1 ;
85+
8186 /**
8287 * This event emitter gets emitted when the user clicks on the marker.
8388 */
@@ -129,6 +134,9 @@ export class SebmGoogleMapMarker implements OnDestroy, OnChanges, AfterContentIn
129134 if ( changes [ 'iconUrl' ] ) {
130135 this . _markerManager . updateIcon ( this ) ;
131136 }
137+ if ( changes [ 'opacity' ] ) {
138+ this . _markerManager . updateOpacity ( this ) ;
139+ }
132140 }
133141
134142 private _addEventListeners ( ) {
@@ -140,10 +148,11 @@ export class SebmGoogleMapMarker implements OnDestroy, OnChanges, AfterContentIn
140148 } ) ;
141149 this . _observableSubscriptions . push ( cs ) ;
142150
143- const ds = this . _markerManager . createEventObservable < mapTypes . MouseEvent > ( 'dragend' , this )
144- . subscribe ( ( e : mapTypes . MouseEvent ) => {
145- this . dragEnd . emit ( { coords : { lat : e . latLng . lat ( ) , lng : e . latLng . lng ( ) } } ) ;
146- } ) ;
151+ const ds =
152+ this . _markerManager . createEventObservable < mapTypes . MouseEvent > ( 'dragend' , this )
153+ . subscribe ( ( e : mapTypes . MouseEvent ) => {
154+ this . dragEnd . emit ( < MouseEvent > { coords : { lat : e . latLng . lat ( ) , lng : e . latLng . lng ( ) } } ) ;
155+ } ) ;
147156 this . _observableSubscriptions . push ( ds ) ;
148157 }
149158
0 commit comments