2018-10-15 21:59:13 +02:00
|
|
|
class ApiAdresse::PointAdapter < ApiAdresse::Adapter
|
2018-10-15 17:26:06 +02:00
|
|
|
def initialize(address)
|
2018-10-15 21:59:13 +02:00
|
|
|
super(address, 1, nil)
|
2018-10-15 17:26:06 +02:00
|
|
|
end
|
2018-10-15 16:33:42 +02:00
|
|
|
|
2018-10-15 22:37:59 +02:00
|
|
|
def geocode
|
2018-10-15 21:59:13 +02:00
|
|
|
handle_result
|
2018-10-15 17:26:06 +02:00
|
|
|
end
|
2018-10-15 16:33:42 +02:00
|
|
|
|
2018-10-15 17:26:06 +02:00
|
|
|
private
|
2018-10-15 16:33:42 +02:00
|
|
|
|
2018-10-15 21:59:13 +02:00
|
|
|
def process_features
|
|
|
|
RGeo::GeoJSON.decode(features[0]['geometry'], json_parser: :json)
|
2018-10-15 16:33:42 +02:00
|
|
|
end
|
|
|
|
end
|