On Feb 13, 4:39 am, JoMoWeb <[email protected]> wrote:
> Andrew - Thank you for your advice.  it was enough to get me going in
> the right direction. (Also, thanks for noticing the directory browsing
> so I could shore that up)
>
> First, I declared a global variable for the map object as you
> suggested.

Not quite. I suggested making "map" global. You've created a global
variable from your local one; and you haven't actually explicitly
defined that as global, you have relied on the missing "var" to imply
that. That may not work as expected in all browsers.

> I tried adding different actions to my button (i.e. checkResize,
> panTo), but nothing worked.  I tried "setZoom()", and that did.  I
> soon came to the conclusion that some actions were not working
> possible because the DOM wasn't respecting the new sizes during the
> animation.  So I built those functions into a setTimeout with the same
> duration as the animation and voila!
>
> Updated example:http://jomoweb.com/gmaps/gmap-dev.php

I couldn't test what I suggested, and it's reasonable that the map
size is only fixed once the animation has stopped. But I can only get
your page to work once, and even then it objects to "map" not being
global.

> Now I am kind of disappointed that the animations jolt rather than
> ease or tween smoothly. Are there features in the API that might make
> this possible, or perhaps a plugin that can help?  My second beef is
> the grey tiles that appear between animations.  Is there a way to pre-
> load a larger map than the visible portion to minimize this.

You can use the {size} option when creating your map, but this forces
the API to consider your map to be a different size from your display
div. That means that it will almost certainly put the centre in the
wrong place on the screen. You cannot tell an existing map to resize
itself independently of its container. I expect what you have is the
best thing you can.

Andrew
--~--~---------~--~----~------------~-------~--~----~
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