(event2)
| 13539 | container.innerHTML = ""; |
| 13540 | } |
| 13541 | async addEventMarker(event2) { |
| 13542 | let config = { title: event2.text, position: {}, map: {} }; |
| 13543 | if (event2.lat && event2.lng) { |
| 13544 | config.position = { lat: event2.lat, lng: event2.lng }; |
| 13545 | } else { |
| 13546 | config.position = { lat: this.settings.error_position.lat, lng: this.settings.error_position.lng }; |
| 13547 | } |
| 13548 | const { AdvancedMarkerElement } = await google.maps.importLibrary("marker"); |
| 13549 | let marker2; |
| 13550 | if (this.scheduler.ext.mapView.createMarker) { |
| 13551 | config.map = this.map; |
| 13552 | marker2 = this.scheduler.ext.mapView.createMarker(config); |
| 13553 | } else { |
| 13554 | marker2 = new AdvancedMarkerElement(config); |
| 13555 | marker2.map = this.map; |
| 13556 | } |
| 13557 | marker2.setMap(this.map); |
| 13558 | if (event2["!nativeeditor_status"] == "true_deleted") { |
| 13559 | marker2.setMap(null); |
| 13560 | } |
| 13561 | google.maps.event.addListener(marker2, "click", () => { |
| 13562 | if (this.infoWindow) { |
| 13563 | this.infoWindow.close(); |
| 13564 | } |
| 13565 | this.infoWindow = new google.maps.InfoWindow({ maxWidth: this.settings.info_window_max_width }); |
| 13566 | this.infoWindow.setContent(this.scheduler.templates.map_info_content(event2)); |
| 13567 | this.infoWindow.open({ anchor: marker2, map: this.map }); |
| 13568 | }); |
| 13569 | let markerInfo = { event: event2, ...config, marker: marker2 }; |
| 13570 | this._markers.push(markerInfo); |
| 13571 | } |
| 13572 | removeEventMarker(eventId) { |
| 13573 | for (let i = 0; i < this._markers.length; i++) { |
| 13574 | if (eventId == this._markers[i].event.id) { |
nothing calls this directly
no test coverage detected