]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/geocoder_controller.rb
Eager load node and way details when processing a map call.
[rails.git] / app / controllers / geocoder_controller.rb
index 531cce4221df34b2d10155e3f872251113d9197c..18812689b4c2c8318d792993e6366987bdde479a 100644 (file)
@@ -29,7 +29,7 @@ class GeocoderController < ApplicationController
 
       if results_count == 1
         position = results.collect { |s| s[:results] }.compact.flatten[0]
-        page.call "setPosition", position[:lat], position[:lon], position[:zoom]
+        page.call "setPosition", position[:lat].to_f, position[:lon].to_f, position[:zoom].to_i
       else
         page.call "openSidebar"
       end