Just started using YM4R to display a Google Map. I can display a map
with 1
Marker. But, I’d like to initialize the map with multiple markers.
Does
anyone know how to do that?
Found the answer to the coordinate problem. Way at the bottom of the
readme, it mentions in passing that GMarker now accepts strings as well
as
coordinates. So all I have to do is:
@address = GMarker.new(“some address that Google can find”)
Very cool!
There is also a Geocode::Get method that queries Google and returns
coordinate info. Haven’t played with it yet.
-Larry
Just started using YM4R to display a Google Map. I can display a
=> “Hello”, :info_window => “Info! Info!”))
Best Regards,
–
Best Regards,
-Larry
“Work, work, work…there is no satisfactory alternative.”
— E.Taft Benson
–
Best Regards,
-Larry
“Work, work, work…there is no satisfactory alternative.”
— E.Taft Benson
This indeed is the source of your problem I think. You code centers on
one specific point with a zoom level of 4. If your markers don’t fall
within the map’s area as centered around this point at this zoom
level, they appear to not exist. However, they are simply not
visible.
To test my theory, simply try zooming out and see if the other markers
appear.
With multiple markers you almost certainly want to use the
center_zoom_on_points_init method to get a map that will show all
points. There is a decent walk through of the process here:
This indeed is the source of your problem I think. You code centers on
one specific point with a zoom level of 4. If your markers don’t fall
within the map’s area as centered around this point at this zoom
level, they appear to not exist. However, they are simply not
visible.
To test my theory, simply try zooming out and see if the other markers
appear.
With multiple markers you almost certainly want to use the
center_zoom_on_points_init method to get a map that will show all
points. There is a decent walk through of the process here: