File

map/map.component.ts

Metadata

Index

Properties
Methods
Inputs
Outputs

Constructor

constructor(moRealtimeService: ManagedObjectRealtimeService, mapService: MapService, layers$: Observable, defaultConfig$: Observable, translateService: TranslateService, geo: GeoService, datePipe: DatePipe, widgetGlobalAutoRefreshService: WidgetGlobalAutoRefreshService)
Parameters :
Name Type Optional
moRealtimeService ManagedObjectRealtimeService No
mapService MapService No
layers$ Observable<MapTileLayer[]> No
defaultConfig$ Observable<MapDefaultConfig> No
translateService TranslateService No
geo GeoService No
datePipe DatePipe No
widgetGlobalAutoRefreshService WidgetGlobalAutoRefreshService No

Inputs

assets
Type : PositionManagedObject | PositionManagedObject[]
config
Type : MapConfig
Default value : {}
polyline$
Type : Observable<[] | []>
Default value : NEVER
polylineOptions
Type : L.PolylineOptions

Outputs

onInit
Type : EventEmitter
onMap
Type : BehaviorSubject
onMove
Type : Observable<L.LeafletEvent>
onMoveEnd
Type : Observable<L.LeafletEvent>
onRealtimeUpdate
Type : EventEmitter
onZoomEnd
Type : Observable<L.LeafletEvent>
onZoomStart
Type : Observable<L.LeafletEvent>

Methods

Protected addLayers
addLayers(layers: MapTileLayer[])
Parameters :
Name Type Optional
layers MapTileLayer[] No
Returns : void
addMarkerToMap
addMarkerToMap(marker: C8yMarker | L.Marker)
Parameters :
Name Type Optional
marker C8yMarker | L.Marker No
Returns : void
center
center()
Returns : void
Protected changeConfig
changeConfig(change: SimpleChange)
Parameters :
Name Type Optional
change SimpleChange No
Returns : void
clearMarkers
clearMarkers(fragment?: C8yMarkerAttributes)
Parameters :
Name Type Optional
fragment C8yMarkerAttributes Yes
Returns : void
findMarker
findMarker(moOrId: string | IEvent | PositionManagedObject)
Parameters :
Name Type Optional
moOrId string | IEvent | PositionManagedObject No
Returns : any
getAssetIcon
getAssetIcon(asset: PositionManagedObject)
Parameters :
Name Type Optional
asset PositionManagedObject No
Returns : any
getAssetMarker
getAssetMarker(asset: PositionManagedObject)
Parameters :
Name Type Optional
asset PositionManagedObject No
Returns : any
getTrackingIcon
getTrackingIcon()
Returns : any
getTrackingMarker
getTrackingMarker(event: IEvent)
Parameters :
Name Type Optional
event IEvent No
Returns : any
Protected handleMobile
handleMobile()
Returns : void
Protected hasChanged
hasChanged(change: SimpleChange, prop)
Parameters :
Name Type Optional
change SimpleChange No
prop No
Returns : boolean
Protected initMap
initMap(layers: MapTileLayer[], defaultConfig: MapConfig)
Parameters :
Name Type Optional
layers MapTileLayer[] No
defaultConfig MapConfig No
Returns : void
Protected initOutputs
initOutputs()
Returns : void
moveToPositionOfMo
moveToPositionOfMo(positions: PositionManagedObject | PositionManagedObject[])
Parameters :
Name Type Optional
positions PositionManagedObject | PositionManagedObject[] No
Returns : void
Protected Async ngAfterViewInit
ngAfterViewInit()
Returns : any
Protected ngOnChanges
ngOnChanges(changes: SimpleChanges)
Parameters :
Name Type Optional
changes SimpleChanges No
Returns : void
Protected ngOnDestroy
ngOnDestroy()
Returns : void
refresh
refresh()
Returns : void
refreshMarkers
refreshMarkers()
Returns : void
removeMarker
removeMarker(marker: C8yMarker | L.Marker)
Parameters :
Name Type Optional
marker C8yMarker | L.Marker No
Returns : void
startRealtime
startRealtime()
Returns : void
stopRealtime
stopRealtime()
Returns : void
Protected toggleControls
toggleControls()
Returns : void
Protected unsubscribeAllListeners
unsubscribeAllListeners()
Returns : void

Properties

Protected destroy$
Default value : new Subject<void>()
isInit
Default value : false

Tells if the map was already initialized.

leaflet

The leaflet representation used.

map
Type : L.Map

The leaflet map object.

mapElement
Type : ElementRef
Decorators :
@ViewChild('map')
markers
Type : Array<C8yMarker | L.Marker>
Default value : []

The markers placed on the map.

popup
Type : MapPopupDirective
Decorators :
@ContentChild(MapPopupDirective)
Protected realtimeSubscription
Type : Subscription
Protected unsubscribeTrigger$
Default value : new Subject<void>()
<div class="c8y-map">
  <div #map></div>
</div>
<ng-content></ng-content>

results matching ""

    No results matching ""