-
Notifications
You must be signed in to change notification settings - Fork 118
Description
The code is rather easy: in the UI code I create an empty container for the map (mapCard) and I use the controller to create the map and add Data (markers):
mapCard.content.clear()
mapCard.content.children.add(
GoogleMapView().apply {
mapView = this
minHeight = 320.0
maxHeight = minHeight
setKey("...")
addEventFilter(ScrollEvent.ANY) {
if (!it.isControlDown) {
parent.fireEvent(it.copyFor(parent, parent))
it.consume()
}
}
}
)
mapView?.addMapInitializedListener(object : MapComponentInitializedListener {
override fun mapInitialized() {
mapView?.createMap(
MapOptions().apply {
center(LatLong(46.80121, 8.22669))
mapType(MapTypeIdEnum.ROADMAP)
mapTypeControl(false)
overviewMapControl(false)
panControl(false)
rotateControl(false)
scaleControl(false)
streetViewControl(false)
zoomControl(true)
zoom(8.0)
}
).also { map = it }
mapView?.removeMapInitializedListener(this)
initResults()
toggleGroup.toggles.forEach { (it as ToggleButton).isDisable = false }
}
})The initResults() method loads some data from a local database and creates markers. I'm using Kotlin for the application and everything runs in a co routine, but that should not be an issue.
What happens is, the map freezes shortly after being initialized, or beeing just for some seconds. No zoomin, no map moving, no marker interaction.
What is notable, though, is that the web container itself still seems to be reacting - I've seen a grey rectanguar border around a marker appearing at least once. So I think, that the input events somehow are not forwarded to the map.
To make sure, it's not something else, I've removed the initResult() method as well as the scroll event filter. No change.
Since I have no more ideas, I thought raising an issue might be a good idea.
#edit: maybe that's noteworthy: I'm using the classpath variant, the application is not modularized...