MapEventsManagerService
is a util service for managing all the map events (click, mouse up, etc.). It exposes a simple API for entity selection, event priority management and adds custom events (drag and drop, long press).EventRegistration
object.eventManager.register()
DisposableObservable<EventResult>
that we can subscribe to.resultObserver.dispose()
CesiumEvent
enum. All cesium events are supported, includes additional events like drag & drop and long pressTrackEntity
is Clicked.AcEntity
is the base class for all angular-cesium entities, it is a part of AcNotification
and is required for MapEventManager
to work properly.AcEntity
e.g class TrackEntity extends AcEntity {}
PickOptions
enum, set the different strategies for picking entities on the map:NO_PICK
- Will not pick entitiesPICK_FIRST
- First entity will be picked . use Cesium.scene.pick()
PICK_ONE
- If few entities are picked plonter is resolved. use Cesium.scene.drillPick()
PICK_ALL
- All entities are picked. use Cesium.scene.drillPick()
MapEventsManagerService
is provided by <ac-map/>
, therefor has few possibilities to reach it:<ac-map/>
hierarchy as seen in the example above (recommended). @viewChild
and ac-map reference: acMapComponent.getMapEventManagerService()
.ON_PUSH
strategy. For example if you update your html template for every map event and you want it to render, you should use ChangeDetectorRef
or wrap your function with NgZone.run()
PickOptions
that we pass to the event registration:PickOptions.NO_PICK
- non of the entities will be picked, you only interested in the map location.PickOptions.PICK_FIRST
- the first(upper) entity will be picked.PickOptions.PICK_ALL
- all entities are picked and returned.PickOptions.PICK_ONE
- only one should be picked, a context will appear allowing the client to choose which entity he wants, selected entity will be passed to the eventcall back.ac-default-plonter
a basic implementation for the plonter context menu. showing a list of entities names to select from.ac-default-plonter
implementation, and disable the default plonter: