master
sh123 2022-09-03 19:02:25 +03:00
rodzic f0aa85cefd
commit 4dcd4c5c4c
2 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -195,7 +195,7 @@ public class MapActivity extends AppCompatActivity {
private void addTrack(List<PositionItem> positions) { private void addTrack(List<PositionItem> positions) {
for (PositionItem trackPoint : positions) { for (PositionItem trackPoint : positions) {
Log.i(TAG, "addPoint " + trackPoint.getLatitude() + " " + trackPoint.getLongitude()); //Log.i(TAG, "addPoint " + trackPoint.getLatitude() + " " + trackPoint.getLongitude());
_stationTrackPoints.add(new GeoPoint(trackPoint.getLatitude(), trackPoint.getLongitude())); _stationTrackPoints.add(new GeoPoint(trackPoint.getLatitude(), trackPoint.getLongitude()));
} }
_stationTrackLine.setPoints(_stationTrackPoints); _stationTrackLine.setPoints(_stationTrackPoints);
@ -274,6 +274,7 @@ public class MapActivity extends AppCompatActivity {
marker.setId(callsign); marker.setId(callsign);
marker.setIcon(drawableText); marker.setIcon(drawableText);
marker.setImage(drawableInfoIcon); marker.setImage(drawableInfoIcon);
/*
marker.setOnMarkerClickListener((monitoredMarker, mapView) -> { marker.setOnMarkerClickListener((monitoredMarker, mapView) -> {
if (_stationTrack != null) if (_stationTrack != null)
_stationTrack.removeObservers(this); _stationTrack.removeObservers(this);
@ -285,6 +286,7 @@ public class MapActivity extends AppCompatActivity {
_stationTrack.observe(this, this::addTrack); _stationTrack.observe(this, this::addTrack);
return false; return false;
}); });
*/
_map.getOverlays().add(marker); _map.getOverlays().add(marker);
_objectOverlayItems.put(callsign, marker); _objectOverlayItems.put(callsign, marker);
} }

Wyświetl plik

@ -19,7 +19,7 @@ public class PositionItemRepository {
} }
public void upsertPositionItem(PositionItem positionItem) { public void upsertPositionItem(PositionItem positionItem) {
AppDatabase.getDatabaseExecutor().execute(() -> _positionItemDao.updatePositionItem(positionItem)); AppDatabase.getDatabaseExecutor().execute(() -> _positionItemDao.upsertPositionItem(positionItem));
} }
public LiveData<List<PositionItem>> getPositionItems(String srcCallsign) { public LiveData<List<PositionItem>> getPositionItems(String srcCallsign) {