X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/22bcfb1240fb3b03613944d8517c100650ab9ad2..a7f00eefc4842a87c9076cac8b70fab5149a732b:/app/controllers/geocoder_controller.rb?ds=inline diff --git a/app/controllers/geocoder_controller.rb b/app/controllers/geocoder_controller.rb index 4ed94b649..8abcbdc44 100644 --- a/app/controllers/geocoder_controller.rb +++ b/app/controllers/geocoder_controller.rb @@ -185,7 +185,7 @@ private name = named.attributes["name"].to_s description = named.elements["description"].to_s distance = format_distance(place.attributes["approxdistance"].to_i) - direction = format_direction(360 - place.attributes["direction"].to_i) + direction = format_direction((place.attributes["direction"].to_i - 180) % 360) prefix = "#{distance} #{direction} of #{type} " results.push({:lat => lat, :lon => lon, :zoom => zoom, :prefix => prefix.capitalize, :name => name,