我正在使用gmaps4rails,并想知道是否有办法在gmaps4rails中更改地图样式(功能,颜色等)。我必须使用json吗?
谢谢,
答案 0 :(得分:0)
<%= gmaps( :map_options => {:raw => "{styles: myStyle}" },
:markers => { "data" => @json, "options" => {"draggable" => true, "list_container" => "markers_list" } }) %>
<script type="text/javascript" charset="utf-8">
var myStyle = [
{ featureType: "all", stylers: [{ "hue": "#ff1a00" } ]}
];
</script>