Initialize track_points_overlay disabled when zoomed out.

This commit is contained in:
voussoir 2023-03-26 11:32:52 -07:00
parent 85d32aff22
commit a566e80ebf

View file

@ -371,6 +371,7 @@ class TrackFragment : Fragment(), MapListener, YesNoDialog.YesNoDialogListener
.setCellSize(12) .setCellSize(12)
track_points_overlay = SimpleFastPointOverlay(pointTheme, overlayOptions) track_points_overlay = SimpleFastPointOverlay(pointTheme, overlayOptions)
mapView.overlays.add(track_points_overlay) mapView.overlays.add(track_points_overlay)
track_points_overlay!!.isEnabled = mapView.zoomLevel >= 16
track_points_overlay!!.setOnClickListener(object : SimpleFastPointOverlay.OnClickListener { track_points_overlay!!.setOnClickListener(object : SimpleFastPointOverlay.OnClickListener {
override fun onClick(points: SimpleFastPointOverlay.PointAdapter?, point: Int?) override fun onClick(points: SimpleFastPointOverlay.PointAdapter?, point: Int?)