Zoom bar disfigured in Google-Maps-for-Rails (gmaps4rails)

时间秒杀一切 提交于 2019-12-30 01:48:09

问题


For some reason my zoom bar is all pixelated and I'm not sure why. Any ideas? I used the basic setup:

Controller: @json = User.all.to_gmaps4rails
View: <%= gmaps4rails(@json) %>

I'm not passing any special parameters or anything. The markers that I have on my models show up beautifully.


回答1:


Add this to your css... there you will also have an issue with the terrain and overlays dropdowns...

#mapCanvas label { width: auto; display:inline; }
#mapCanvas img { max-width: none; }



回答2:


With the gmaps4rails 1.5.6, use map instead of mapCanvas, i.e.,

#map label { width: auto; display:inline; }
#map img { max-width: none; }

Reference:

Github: twitter/bootstrap issue list - Bootstrap distorts some Google Maps Controls and Overlays - commented by diogocsc
https://github.com/twitter/bootstrap/issues/1552#issuecomment-11153057




回答3:


This what I found and the solutions is simple.

https://github.com/twitter/bootstrap/issues/1552



来源:https://stackoverflow.com/questions/9548330/zoom-bar-disfigured-in-google-maps-for-rails-gmaps4rails

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!