Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.data().filter(row => !this.omitNullLatLong() || (!!row[latIdx] && !!row[longIdx])).forEach(row => {
const marker = new Marker([row[latIdx], row[longIdx]], markerOptions(row))
.on("click", e => this.clickHandler(e, marker, row))
;
const tooltipText = this.tooltipText(this.rowToObj(row), this.propValue(tooltipIdx, row, ""));
if (tooltipText) {
marker.bindTooltip(tooltipText, {
direction: this.tooltipDirection(),
offset: point(this.tooltipOffsetX(), this.tooltipOffsetY())
});
}
const popupText = this.popupText(this.rowToObj(row), this.propValue(popupIdx, row, ""));
if (popupText) {
marker.bindPopup(popupText, {
offset: point(this.popupOffsetX(), this.popupOffsetY())
});
}
this.add(marker);
data.forEach(row => {
const circle = new Marker(latLongFunc(row), {
icon: this.createIcon(weightFunc(row), this._palette(weightFunc(row), extent[0], extent[1]), format),
origRow: row
} as any).on("click", e => this.clickHandler(e, row));
circle.bindTooltip("Weight: " + weightFunc(row));
this.add(circle);
});
}