kopia lustrzana https://github.com/rt-bishop/Look4Sat
rodzic
f48a46d0e4
commit
1156824463
|
@ -14,8 +14,8 @@ android {
|
|||
minSdkVersion 21
|
||||
resConfigs "en,ru"
|
||||
targetSdkVersion 31
|
||||
versionCode 259
|
||||
versionName "2.5.9"
|
||||
versionCode 260
|
||||
versionName "2.6.0"
|
||||
|
||||
kapt {
|
||||
arguments {
|
||||
|
|
|
@ -70,7 +70,7 @@ class MapFragment : Fragment(R.layout.fragment_map) {
|
|||
mapView.apply {
|
||||
setMultiTouchControls(true)
|
||||
setTileSource(TileSourceFactory.WIKIMEDIA)
|
||||
minZoomLevel = getMinZoom(resources.displayMetrics.heightPixels)
|
||||
minZoomLevel = getMinZoom(resources.displayMetrics.heightPixels) + 0.25
|
||||
maxZoomLevel = 5.75
|
||||
controller.setZoom(minZoomLevel + 0.25)
|
||||
zoomController.setVisibility(CustomZoomButtonsController.Visibility.NEVER)
|
||||
|
@ -113,42 +113,24 @@ class MapFragment : Fragment(R.layout.fragment_map) {
|
|||
binding.apply {
|
||||
val markers = FolderOverlay()
|
||||
posMap.entries.forEach {
|
||||
if (viewModel.shouldUseTextLabels()) {
|
||||
Marker(mapView).apply {
|
||||
setInfoWindow(null)
|
||||
textLabelFontSize = 24
|
||||
textLabelBackgroundColor = Color.TRANSPARENT
|
||||
textLabelForegroundColor =
|
||||
ContextCompat.getColor(requireContext(), R.color.themeLight)
|
||||
setTextIcon(it.key.params.name)
|
||||
setAnchor(Marker.ANCHOR_CENTER, Marker.ANCHOR_CENTER)
|
||||
try {
|
||||
position = GeoPoint(it.value.latitude, it.value.longitude)
|
||||
} catch (exception: IllegalArgumentException) {
|
||||
Timber.d(exception)
|
||||
}
|
||||
setOnMarkerClickListener { _, _ ->
|
||||
viewModel.selectSatellite(it.key)
|
||||
return@setOnMarkerClickListener true
|
||||
}
|
||||
markers.add(this)
|
||||
Marker(mapView).apply {
|
||||
setInfoWindow(null)
|
||||
textLabelFontSize = 24
|
||||
textLabelBackgroundColor = Color.TRANSPARENT
|
||||
textLabelForegroundColor =
|
||||
ContextCompat.getColor(requireContext(), R.color.themeLight)
|
||||
setTextIcon(it.key.params.name)
|
||||
setAnchor(Marker.ANCHOR_CENTER, Marker.ANCHOR_CENTER)
|
||||
try {
|
||||
position = GeoPoint(it.value.latitude, it.value.longitude)
|
||||
} catch (exception: IllegalArgumentException) {
|
||||
Timber.d(exception)
|
||||
}
|
||||
} else {
|
||||
Marker(mapView).apply {
|
||||
setInfoWindow(null)
|
||||
setAnchor(Marker.ANCHOR_CENTER, Marker.ANCHOR_CENTER)
|
||||
icon = ContextCompat.getDrawable(requireContext(), R.drawable.ic_map_sat)
|
||||
try {
|
||||
position = GeoPoint(it.value.latitude, it.value.longitude)
|
||||
} catch (exception: IllegalArgumentException) {
|
||||
Timber.d(exception)
|
||||
}
|
||||
setOnMarkerClickListener { _, _ ->
|
||||
viewModel.selectSatellite(it.key)
|
||||
return@setOnMarkerClickListener true
|
||||
}
|
||||
markers.add(this)
|
||||
setOnMarkerClickListener { _, _ ->
|
||||
viewModel.selectSatellite(it.key)
|
||||
return@setOnMarkerClickListener true
|
||||
}
|
||||
markers.add(this)
|
||||
}
|
||||
}
|
||||
mapView.overlays[3] = markers
|
||||
|
@ -161,9 +143,13 @@ class MapFragment : Fragment(R.layout.fragment_map) {
|
|||
satTrack.forEach { track ->
|
||||
val trackPoints = track.map { GeoPoint(it.latitude, it.longitude) }
|
||||
Polyline().apply {
|
||||
outlinePaint.set(trackPaint)
|
||||
setPoints(trackPoints)
|
||||
trackOverlay.add(this)
|
||||
try {
|
||||
setPoints(trackPoints)
|
||||
outlinePaint.set(trackPaint)
|
||||
trackOverlay.add(this)
|
||||
} catch (exception: IllegalArgumentException) {
|
||||
Timber.d(exception)
|
||||
}
|
||||
}
|
||||
}
|
||||
binding.mapView.overlays[1] = trackOverlay
|
||||
|
|
|
@ -57,15 +57,6 @@
|
|||
app:iconSpaceReserved="false"
|
||||
app:useSimpleSummaryProvider="true" />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory
|
||||
android:title="@string/pref_map_labels_title"
|
||||
app:iconSpaceReserved="false">
|
||||
<SwitchPreferenceCompat
|
||||
android:defaultValue="true"
|
||||
android:key="shouldUseTextLabels"
|
||||
android:title="@string/pref_map_labels"
|
||||
app:iconSpaceReserved="false" />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory
|
||||
android:title="@string/pref_other_title"
|
||||
app:iconSpaceReserved="false">
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
Fixed James Webb Space Telescope crash
|
||||
However still reporting erroneous data
|
||||
Fixed DataParser bug, issues #77 & #80
|
|
@ -1,6 +1,3 @@
|
|||
Restored missing app icons for low-res/api screens
|
||||
Removed redundant material components
|
||||
Fixed Redmi dark theme colors bug
|
||||
Fixed RemoteSource update crash
|
||||
Matched CSV and TLE parsers output
|
||||
Further code refactoring and cleanup
|
||||
Fixed James Webb Space Telescope crash
|
||||
However still reporting erroneous data
|
||||
Fixed DataParser bug, issues #77 & #80
|
Ładowanie…
Reference in New Issue