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

Method addEventMarker

codebase/sources/dhtmlxscheduler.es.js:13779–13788  ·  view source on GitHub ↗
(event2)

Source from the content-addressed store, hash-verified

13777 container.innerHTML = "";
13778 }
13779 addEventMarker(event2) {
13780 let config = [event2.lng, event2.lat];
13781 if (!event2.lat || !event2.lng) {
13782 config = [this.settings.error_position.lng, this.settings.error_position.lat];
13783 }
13784 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));
13785 const marker2 = new mapboxgl.Marker().setLngLat(config).setPopup(popup).addTo(this.map);
13786 const markerInfo = { event: event2, marker: marker2 };
13787 this._markers.push(markerInfo);
13788 }
13789 removeEventMarker(eventId) {
13790 for (let i = 0; i < this._markers.length; i++) {
13791 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