MCPcopy Create free account
hub / github.com/DHTMLX/scheduler / addEventMarker

Method addEventMarker

codebase/sources/dhtmlxscheduler.js:13783–13792  ·  view source on GitHub ↗
(event2)

Source from the content-addressed store, hash-verified

13781 container.innerHTML = "";
13782 }
13783 addEventMarker(event2) {
13784 let config = [event2.lng, event2.lat];
13785 if (!event2.lat || !event2.lng) {
13786 config = [this.settings.error_position.lng, this.settings.error_position.lat];
13787 }
13788 const popup = new mapboxgl.Popup({ offset: 25, focusAfterOpen: false }).setMaxWidth(`${this.settings.info_window_max_width}px`).setHTML(this.scheduler.templates.map_info_content(event2));
13789 const marker2 = new mapboxgl.Marker().setLngLat(config).setPopup(popup).addTo(this.map);
13790 const markerInfo = { event: event2, marker: marker2 };
13791 this._markers.push(markerInfo);
13792 }
13793 removeEventMarker(eventId) {
13794 for (let i = 0; i < this._markers.length; i++) {
13795 if (eventId == this._markers[i].event.id) {

Callers 3

addEventWithLocationFunction · 0.45
attachSchedulerEventsFunction · 0.45
map_viewFunction · 0.45

Calls 1

map_info_contentMethod · 0.65

Tested by

no test coverage detected