require 'net/http'
require 'rexml/document'
+ before_filter :authorize_web
before_filter :set_locale
def search
data = response.split(/\s*,\s+/) # lat,long,town,state,zip
@results.push({:lat => data[0], :lon => data[1],
:zoom => APP_CONFIG['postcode_zoom'],
- :prefix => "#{data[2]}, #{data[3]}, ",
+ :prefix => "#{data[2]}, #{data[3]},",
:name => data[4]})
end
description = named.elements["description"].to_s
distance = format_distance(place.attributes["approxdistance"].to_i)
direction = format_direction((place.attributes["direction"].to_i - 180) % 360)
- prefix = "#{distance} #{direction} of #{type} "
+ prefix = t "geocoder.description_osm_namefinder.prefix", :distance => distance, :direction => direction, :type => type
@results.push({:lat => lat, :lon => lon, :zoom => zoom,
:prefix => prefix.capitalize, :name => name,
:description => description})