Okay, I've given it some thought and while the zoomOut() solution
works, it would be much better if perhaps there was a way to quickly
calculate whether the markers are too close to the edges of the map,
and -- if so and only if so -- then zoomOut().  Otherwise, the present
method works in about 85 percent of the cases and looks nicer at a
closer zoom level.  Any thoughts?



On Aug 31, 2:48 pm, onsenjapan <[EMAIL PROTECTED]> wrote:
> I figured this one out.  I just wrapped the existing line in the one
> you suggested, as so:
>
> map.zoomOut(map.setCenter(bounds.getCenter(),
> map.getBoundsZoomLevel(bounds)));
>
> And now it works fine!  Thank you!
>
> On Aug 31, 1:49 pm, onsenjapan <[EMAIL PROTECTED]> wrote:
>
> > Yes, I was thinking that just zooming out once would be an easy way to
> > fix the problem.
>
> > I have this line currently:
>
> > map.setCenter(bounds.getCenter(), map.getBoundsZoomLevel(bounds));
>
> > Do you know what to tweak to just shift the zoom one zoomlevel out?
>
> > (I tried appending
>
> > map.zoomOut();
>
> > to the end and that zoomed all the way out to the very maximum level.
> > Oops!)
>
> > On Aug 31, 1:22 pm, Andy R <[EMAIL PROTECTED]> wrote:
>
> > > 10px, left/right/top/bottom? Is 10px enough for all controls?
>
> > > Simple solution: load your markers, adjust position/zoom, then
> > > map.zoomOut();
>
> > > On 31 Aug., 19:13, onsenjapan <[EMAIL PROTECTED]> wrote:
>
> > > > I was pretty sure this would be easily answered by a search, but I
> > > > didn't come up with anything that answered my question.  That probably
> > > > means this is so basic that I'm going to say "Dooh!" but I hope
> > > > someone will help point me to the right place.
>
> > > > I think the problem relates to zoom levels or setting map bounds...not
> > > > sure which.  Basically, after I do a search, in certain cases the
> > > > marker points show up at the very, very extreme sides of the
> > > > map...almost invisible.  Sometimes they appear tucked under the "map"
> > > > and "terrain" buttons at the upper right, or under the scale slider on
> > > > the left.  I would like to simply add a function that will extend the
> > > > map border by 10 more pixels or lat/lng points or zoom levels or
> > > > whatever so that the points show up well within the borders of the map
> > > > each time.
>
> > > > In CSS this would be like "padding":  I want to have a 10pixel width
> > > > buffer in which no points are shown so that all points will be nicely
> > > > situated within the visible points of the map.
>
> > > > As is, it's a very functional map so I'm just nit-picking, but it's
> > > > definitely a pretty big cosmetic flaw if the markers aren't easily
> > > > seen in certain cases.
>
> > > > For example, go towww.onsenjapan.netandfindonsenthat are 50 miles
> > > > from Tokyo.
>
> > > > As always, thank you very much for assistance and suggestions.  There
> > > > are some hugely helpful people here.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to