Google Maps, Ruby on Rails, Zoom level with one marker

Posted by Enric Ribas on Stack Overflow See other posts from Stack Overflow or by Enric Ribas
Published on 2011-04-28T16:36:52Z Indexed on 2013/06/27 4:22 UTC
Read the original article Hit count: 390

I am adding google maps support with apneadiving / Google-Maps-for-Rails (thanks awesome gem)

I am finding one slight glitch, however, which very likely is my fault.

auto_zoom works great when there are multiple markers. However, when there is only one marker it is zoomed in to the max level which is not pretty.

"zoom" will only work when auto_zoom is false, so that's not what I want.

So therefore you could use "maxZoom" but now users cannot zoom in manually beyond that point which is not what I want.

Is there a way around this? Is my explanation making sense? Is this a limitation of Google Maps API?

Thanks...

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about ruby