CircleMarkerGenerator.kt
430 Bytes
package map
import application.model.observableMessages
fun clearMap(map: LeafletMapView) {
map.clearAllLayer()
}
fun displayMessageOnMap(map: LeafletMapView) {
observableMessages.vessels.forEach { (_, value) ->
value.messages.forEach { (_, message) ->
map.execScript("L.circleMarker([${message.latitude}, ${message.longitude}], {renderer: myRenderer, radius: 0.01}).addTo(myMap)")
}
}
}