Skip to content

Commit d0b7ba6

Browse files
committed
add class to polygon tooltip
1 parent 92d4661 commit d0b7ba6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/js/journeymap.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ class Journeymap {
269269
}
270270

271271
return markers
272+
272273
}
273274

274275
_formatText(text) {
@@ -565,7 +566,8 @@ class Journeymap {
565566

566567
coords = coords.concat([coords], holes)
567568
}
568-
569+
let firstPoint = Object.value(polygon.points)
570+
let className = "polygon-" + translateCoords(firstPoint.x, firstPoint.z) + polygon.label.replaceAll(",", "_").replaceAll(":", "_").replaceAll(" ", "_").replaceAll("\n", "").toLowerCase()
569571
polygons.push({
570572
latLngs: coords,
571573

@@ -576,6 +578,7 @@ class Journeymap {
576578
fontColor: polygon.fontColor,
577579
fillColor: polygon.fillColor,
578580
fillOpacity: polygon.fillOpacity,
581+
className: className
579582
})
580583
}
581584

0 commit comments

Comments
 (0)