Using Firebug, it looks like both the CSS declared height/width style is set at 300 each and the computed height/width at 300, both before and after loading the directions, so I don't see size changes for the 'map_canvas' div. do all the parent divs need to specified height/ width?
does the rendered map size effect map centering and zoom? The problem that I am seeing (and hopefully there isnt another issue for another browser/OS...) is when the map changes to show directions I get zoomed out to a view of parts of north and south america... the directions are still mapped, but I just have to re-center by draggin, and then zoom WAY back in to see them. Is there an easy function to zoom/center the map based on the bounds of the starting/ending points, or would I need to manually calculate where to re-center the map and how far to zoom? (and for calculated zoom, is there a way to use a boundary area to determine what zoom level is applicable?) I apologize if I'm just being dense and not getting it.... I've just looked throught as much documentation as I could, and am still completely lost as to a workable solution. On Mar 23, 9:17 am, "[email protected]" <[email protected]> wrote: > On Mar 23, 7:05 am, Dan Witten <[email protected]> > wrote: > > > I am using Spry and some other JS to change the display alot, but the > > 'map_canvas' div that I use to load the map into has this for its CSS > > rule: > > > #map_canvas { > > width: 300px; > > height: 300px; > > border: solid 3px #3B2314; > > margin: 5px; > > float: left; > > display: inline; > > > } > > > is there something I'm not seeing or some code that is changing it? > > I see a bunch of code that looks like it plays with the size of that > div. Could very well be browser specific and not working correctly in > standards compliant browsers... > > -- Larry > > > > > The map is the right size, its just recentering way off point and > > zooming way out when it loads the directions. > > > On Mar 23, 8:49 am, "[email protected]" <[email protected]> > > wrote: > > > > On Mar 23, 6:23 am, Dan Witten <[email protected]> > > > wrote: > > > > > I've looked all over the place to figure out what I'm doing wrong, and > > > > its kind of hard to explain. The problem I'm having is the map is > > > > moving and zooming to weird and random places when directions are > > > > loaded. It seems to work ok in IE 8, and in FF (after i changed a > > > > config option in my browser as described in the generic maps > > > > troubleshooting area...) but isn't working properly on chrome or > > > > safari. One thing that I think could be the issue is, I am trying to > > > > avoid the entire page reloading, and so I'm triggering my directions > > > > load function from a click event listener and not a form submission. > > > > Could this be causing the problem? > > > > Unlikely. It looks like (at least in Chrome) the zero size div > > > problem (the browser is telling the Maps API that the div has zero > > > size). > > > > -- Larry > > > > > here is the site: > > > > >http://www.noelrosehairstudio.com > > > > > under the MAP/DIRECTIONS nav. > > > > > any input is helpful, and I would be happy to post any additional > > > > resources if anyone needs to look at them. Thanks > > > > > -Dan- Hide quoted text - > > > > - Show quoted text -- Hide quoted text - > > > - Show quoted text -- Hide quoted text - > > - Show quoted text - -- 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.
