2013-02-27 94 views
0

有誰知道如何解決這個問題? 看起來像下面一行中的縮放參數被忽略。每次我都會以相同的縮放級別觀看相同的視圖。 感謝您的任何提示。gmaps導軌忽略縮放參數

=gmaps("map_options" => { "detect_location" => false, "center_on_user" => false, "zoom" => 9},"markers" => { "data" => @json }) 

回答

0

您在gmaps方法中缺少{}。你所有的參數都應該用括號括起來:

<%= gmaps({ 
      "map_options" => { "detect_location" => false, "center_on_user" => false, "zoom" => 9}, 
      "markers"  => { "data" => @json } 
    }) 
%>