nodes, not cameras

This commit is contained in:
stopflock
2025-08-29 16:44:34 -05:00
parent b5c210d009
commit 3ddebd2664
15 changed files with 73 additions and 73 deletions
+5 -5
View File
@@ -31,7 +31,7 @@ class MapDataProvider {
AppState.instance.setOfflineMode(enabled);
}
/// Fetch cameras from OSM/Overpass or local storage.
/// Fetch surveillance nodes from OSM/Overpass or local storage.
/// Remote is default. If source is MapSource.auto, remote is tried first unless offline.
Future<List<OsmCameraNode>> getCameras({
required LatLngBounds bounds,
@@ -44,7 +44,7 @@ class MapDataProvider {
// Explicit remote request: error if offline, else always remote
if (source == MapSource.remote) {
if (offline) {
throw OfflineModeException("Cannot fetch remote cameras in offline mode.");
throw OfflineModeException("Cannot fetch remote nodes in offline mode.");
}
return camerasFromOverpass(
bounds: bounds,
@@ -79,7 +79,7 @@ class MapDataProvider {
pageSize: AppState.instance.maxCameras,
);
} catch (e) {
debugPrint('[MapDataProvider] Remote camera fetch failed, error: $e. Falling back to local.');
debugPrint('[MapDataProvider] Remote node fetch failed, error: $e. Falling back to local.');
return fetchLocalCameras(
bounds: bounds,
profiles: profiles,
@@ -89,7 +89,7 @@ class MapDataProvider {
}
}
/// Bulk/paged camera fetch for offline downloads (handling paging, dedup, and Overpass retries)
/// Bulk/paged node fetch for offline downloads (handling paging, dedup, and Overpass retries)
/// Only use for offline area download, not for map browsing! Ignores maxCameras config.
Future<List<OsmCameraNode>> getAllCamerasForDownload({
required LatLngBounds bounds,
@@ -100,7 +100,7 @@ class MapDataProvider {
}) async {
final offline = AppState.instance.offlineMode;
if (offline) {
throw OfflineModeException("Cannot fetch remote cameras for offline area download in offline mode.");
throw OfflineModeException("Cannot fetch remote nodes for offline area download in offline mode.");
}
return camerasFromOverpass(
bounds: bounds,
+2 -2
View File
@@ -14,7 +14,7 @@ class Uploader {
Future<bool> upload(PendingUpload p) async {
try {
print('Uploader: Starting upload for camera at ${p.coord.latitude}, ${p.coord.longitude}');
print('Uploader: Starting upload for node at ${p.coord.latitude}, ${p.coord.longitude}');
// 1. open changeset
final action = p.isEdit ? 'Update' : 'Add';
@@ -22,7 +22,7 @@ class Uploader {
<osm>
<changeset>
<tag k="created_by" v="$kClientName $kClientVersion"/>
<tag k="comment" v="$action ${p.profile.name} surveillance camera"/>
<tag k="comment" v="$action ${p.profile.name} surveillance node"/>
</changeset>
</osm>''';
print('Uploader: Creating changeset...');