Skip to content

Commit

Permalink
Don't hardcode default provider ID
Browse files Browse the repository at this point in the history
  • Loading branch information
quincylvania committed Feb 19, 2025
1 parent 3066713 commit 5851b25
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/providers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class Providers
# Use layers <key>
def self.default
'openstreetmap'
self.layers.keys.first
end

def self.options()
Expand All @@ -14,6 +14,8 @@ def self.options()
end
end

# Get the ID of the provider that corresponds to the
# given URL (which may be saved in the database).
# TODO: is there a better way?
def self.derive(url)
if url.include? 'openstreetmap.org'
Expand Down

0 comments on commit 5851b25

Please sign in to comment.