0

有人知道如何解决这个问题吗?看起来下一行中的缩放参数被忽略了。每次我都会以相同的缩放级别获得相同的视图。感谢您的任何提示。

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

1 回答 1

0

您在 gmaps 方法中缺少 {}。您的所有参数都应该用括号括起来,如下所示:

<%= gmaps({
            "map_options"   => { "detect_location" => false, "center_on_user" => false, "zoom" => 9},
            "markers"       => { "data" => @json } 
    })
%>
于 2013-06-22T23:37:59.027 回答