2015-08-10 11:05:06 +02:00
|
|
|
module Carto
|
|
|
|
# this class take a string in input and return a point
|
|
|
|
class Geocodeur
|
|
|
|
def self.convert_adresse_to_point(address)
|
2016-01-27 15:48:27 +01:00
|
|
|
Carto::Bano::PointRetriever.new(address).point
|
2015-08-10 11:05:06 +02:00
|
|
|
rescue RestClient::Exception, JSON::ParserError => e
|
|
|
|
Rails.logger.error e.message
|
|
|
|
nil
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|