0

我正在使用 gmaps4rails,想知道是否有办法在 gmaps4rails 中更改地图样式(特征、颜色等)。我必须为此使用json吗?

谢谢你,

4

1 回答 1

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>
于 2012-10-03T11:27:42.140 回答