Skip to content

Instantly share code, notes, and snippets.

View Varo95's full-sized avatar
🎯
Focusing

Álvaro Pérez Urbano Varo95

🎯
Focusing
  • Fujitsu
  • Sevilla - Spain
  • 01:45 (UTC +01:00)
  • X @Varo951
View GitHub Profile
@Varo95
Varo95 / Controller.kt
Created December 16, 2025 17:44
How to serve dynmap tiles (Springboot+Kotlin) and consume it on Angular with leaflet (Not ended yet...)
private val base: Path = Paths.get("{Directory where dynmap worlds storage}")
private val blank: Path = Paths.get("{FullpathToblank}/blank.png")
@GetMapping("/{tileType}/{z}/{x}/{y}.png")
@Throws(IOException::class)
//tileType needs to be 'f' or 'flat'
fun getDynMapTile(
@PathVariable tileType: String,
@PathVariable z: Int,
@PathVariable x: Int,