diff options
Diffstat (limited to 'androidApp')
-rw-r--r-- | androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt index 681a21f..41cfd50 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt @@ -133,14 +133,12 @@ class MapFragment : GlobeMapFragment() { ThreadMode.ThreadAny )) - if (isReport && markers.isNotEmpty()) { - Log.d("MapFragment", "Displaying report") - - val points = markers.map { marker -> - Point2d.FromDegrees(marker.longitude, marker.latitude) - }.toTypedArray() + val points = markers.map { marker -> + Point2d.FromDegrees(marker.longitude, marker.latitude) + }.toTypedArray() - // Draw polyline + // Draw polyline for report + if (isReport && markers.isNotEmpty()) { val vector = VectorObject() vector.addAreal(points) @@ -153,8 +151,10 @@ class MapFragment : GlobeMapFragment() { vectorInfo, ThreadMode.ThreadAny )) + } - // Center map to polyline bounds + // Center map to bounds + if (markers.isNotEmpty()) { val mbr = Mbr() points.forEach { mbr.addPoint(it) |