Bike!Bike! Website!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

24 lines
597 B

# config/initializers/geocoder.rb
config = {
# geocoding service (see below for supported options):
lookup: :google,
# IP address geocoding service (see below for supported options):
ip_lookup: :freegeoip,
# to use an API key:
# geocoding service request timeout, in seconds (default 3):
timeout: 5,
# set default units to kilometers:
units: :km
}
# use our api key on the server
if Rails.env.preview? || Rails.env.production?
config[:api_key] = "AIzaSyDurfjX9f_NgYsJLyUuGqwdKuI745CE_OE"
config[:use_https] = true
end
Geocoder.configure(config)