2025-01-07 07:12:14 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
|
|
class DawarichSettings
|
|
|
|
|
class << self
|
|
|
|
|
def reverse_geocoding_enabled?
|
2025-01-07 07:41:09 -05:00
|
|
|
@reverse_geocoding_enabled ||= photon_enabled? || geoapify_enabled?
|
2025-01-07 07:12:14 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def photon_enabled?
|
2025-01-07 07:41:09 -05:00
|
|
|
@photon_enabled ||= PHOTON_API_HOST.present?
|
2025-01-07 07:12:14 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def photon_uses_komoot_io?
|
2025-01-07 07:41:09 -05:00
|
|
|
@photon_uses_komoot_io ||= PHOTON_API_HOST == 'photon.komoot.io'
|
2025-01-07 07:12:14 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def geoapify_enabled?
|
2025-01-07 07:41:09 -05:00
|
|
|
@geoapify_enabled ||= GEOAPIFY_API_KEY.present?
|
2025-01-07 07:12:14 -05:00
|
|
|
end
|
2025-01-24 06:01:54 -05:00
|
|
|
|
|
|
|
|
def meters_between_tracks
|
|
|
|
|
@meters_between_tracks ||= 300
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def minutes_between_tracks
|
|
|
|
|
@minutes_between_tracks ||= 20
|
|
|
|
|
end
|
2025-01-07 07:12:14 -05:00
|
|
|
end
|
|
|
|
|
end
|