You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 16, 2022. It is now read-only.
i had written an Application with your MapjFx Libary. Now i have the Problem that the Marker will disapear after one second. Marker marker = Marker.createProvided(Marker.Provided.GREEN).setPosition(cords).setVisible(true); MapLabel label = new MapLabel(string).setPosition(cords).setVisible(true); marker.attachLabel(label); mapView.addMarker(marker); mapView.setCenter(cords);
Can you say me why?
The Map is fully initialized at the moment where i call the function.
As second problem, i get multiple caching errors like the following: Mär 07, 2017 2:03:00 PM com.sothawo.mapjfx.offline.OfflineCache readCachedDataInfo SCHWERWIEGEND: could not read dataInfo from C:\Users\######\workspace\######\mapjfx-cache\https%3A%2F%2Fx.tile.openstreetmap.org%2F15%2F17294%2F10579.png.dataInfo
The text was updated successfully, but these errors were encountered:
is the marker variable local to the method where you call it? The MapView only keeps a weak reference to the Marker object, so if you do not keep a reference to the Marker object, it will be garbage collected and disappear from the Map. This is documented in the JavaDoc for MapView.addMarker().
The reason for this is, that if the MapView would keep strong references and the user of the MapView does not remove the Markers from the Map, they would be kept until the MapView is disposed and this would be a memory leak. So to keep it safe, the MapView does not take any responsibility to keep a reference to the Marker objects.
You have to either make them fields in the class using the MapView or put them in some collection of markers which prevents them from being garbage collected - this collection itself must be a field or still be referenced somewhere.
As to the second error: this should only be a warning which appears on first accessing the map tiles; I have to change the logging level.
Hello,
i had written an Application with your MapjFx Libary. Now i have the Problem that the Marker will disapear after one second.
Marker marker = Marker.createProvided(Marker.Provided.GREEN).setPosition(cords).setVisible(true); MapLabel label = new MapLabel(string).setPosition(cords).setVisible(true); marker.attachLabel(label); mapView.addMarker(marker); mapView.setCenter(cords);
Can you say me why?
The Map is fully initialized at the moment where i call the function.
As second problem, i get multiple caching errors like the following:
Mär 07, 2017 2:03:00 PM com.sothawo.mapjfx.offline.OfflineCache readCachedDataInfo SCHWERWIEGEND: could not read dataInfo from C:\Users\######\workspace\######\mapjfx-cache\https%3A%2F%2Fx.tile.openstreetmap.org%2F15%2F17294%2F10579.png.dataInfo
The text was updated successfully, but these errors were encountered: