i've got confused trying to change the map controls like said here But don`t know how to implement using gmaps4rails gem.
I just wanted to leave only zoom and pan control and remove all the others. But js console says for:
>> Gmaps.map.map.mapTypeControl
>> false
But it is still present on a map.
You can use a raw
parameter to send any map option you need. See doc.
I guess, you should do:
<%= gmaps(:map_options => { :raw => '{ panControl: true,
zoomControl: true,
mapTypeControl: false,
scaleControl: false,
streetViewControl: false,
overviewMapControl: false}'
},
:markers => { :data => @json }
)%>