Carto::Geocodeur → ApiAdresse::Geocodeur
This commit is contained in:
parent
d726fbf698
commit
5e9e913dce
4 changed files with 4 additions and 4 deletions
11
app/lib/api_adresse/geocodeur.rb
Normal file
11
app/lib/api_adresse/geocodeur.rb
Normal file
|
@ -0,0 +1,11 @@
|
|||
module ApiAdresse
|
||||
# this class take a string in input and return a point
|
||||
class Geocodeur
|
||||
def self.convert_adresse_to_point(address)
|
||||
ApiAdresse::PointRetriever.new(address).point
|
||||
rescue RestClient::Exception, JSON::ParserError => e
|
||||
Rails.logger.error e.message
|
||||
nil
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue