import { EventEmitter , NgZone } from '@angular/core' ; export class LeafletUtil { static mapToArray < T > ( map ) { const toReturn = [ ] ; for ( const k in map ) { if ( map . hasOwnProperty ( k ) ) { toReturn . push ( map [ k ] ) ; } } return toReturn ; } static handleEvent < T > ( zone , eventEmitter , event ) { if ( 0 < eventEmitter . observers . length ) { zone . run ( ( ) => { eventEmitter . emit ( event ) ; } ) ; } } }