@sources.push "osm_nominatim"
else
@sources.push "osm_nominatim"
- @sources.push "geonames"
+ @sources.push "geonames" if defined?(GEONAMES_USERNAME)
end
end
@results = Array.new
# ask geonames.org
- response = fetch_xml("http://ws.geonames.org/search?q=#{escape_query(query)}&maxRows=20")
+ response = fetch_xml("http://api.geonames.org/search?q=#{escape_query(query)}&maxRows=20&username=#{GEONAMES_USERNAME}")
# parse the response
response.elements.each("geonames/geoname") do |geoname|
max_messages_per_hour: 60
# Domain for handling message replies
#messages_domain: "messages.openstreetmap.org"
+ # Geonames authentication details
+ #geonames_username: ""
# Quova authentication details
#quova_username: ""
#quova_password: ""