File tree Expand file tree Collapse file tree
src/Providers/Maps/Google/Marker Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44// eslint-disable-next-line @typescript-eslint/no-unused-vars
55namespace Provider . Maps . Google . Marker {
66 export class MarkerPopup extends Marker implements OSFramework . Maps . Marker . IMarkerPopup {
7- private _contentString : string ;
7+ private _contentString : string = '' ;
88
99 protected _setMarkerEvents ( ) : void {
1010 super . _setMarkerEvents ( ) ;
1111
1212 // Open the popup when the user clicks on the Marker
1313 // To close the Marker click on it and then use the ESC or the "x" on the top right corner of the popup
1414 // Or use the API method - closePopup()
15- this . _provider . addListener ( ' click' , ( ) => {
15+ this . _provider . addListener ( Constants . Marker . ProviderEventNames . click , ( ) => {
1616 this . refreshPopupContent ( ) ;
1717 this . openPopup ( ) ;
1818 } ) ;
@@ -36,9 +36,10 @@ namespace Provider.Maps.Google.Marker {
3636 }
3737
3838 public refreshPopupContent ( ) : void {
39- this . _contentString = OSFramework . Maps . Helper . GetElementByUniqueId ( this . uniqueId ) . querySelector (
40- OSFramework . Maps . Helper . Constants . markerPopup
41- ) . innerHTML ;
39+ this . _contentString =
40+ OSFramework . Maps . Helper . GetElementByUniqueId ( this . uniqueId ) ?. querySelector (
41+ OSFramework . Maps . Helper . Constants . markerPopup
42+ ) ?. innerHTML ?? '' ;
4243 this . map . features . infoWindow . setPopupContent ( this . _contentString ) ;
4344 }
4445 }
You can’t perform that action at this time.
0 commit comments