Hello, Between Beginning Google Maps Mashups with Mapplets, KML and GeoRSS p. 73 example and a posting on Google Groups http://groups.google.com/group/Google-Maps-API/browse_thread/thread/40feac500a308eff/27df5befcfe7a5a6?lnk=gst&q=GScaleControl#27df5befcfe7a5a6 I was able to see how to move the scale bar.
Note the Google Bar (search bar), by default, is displayed in the same location as the scale bar. Solution, move the default location of the scale bar. Here is a link to my working example: http://faculty.unlv.edu/jensen/html/CSS/GoogleMapsAPI/divGoogleBarScreenOverlayLogoFullPageMaps.html And here is a copy-paste of the JavaScript code // ===================================================================== // Google Maps User Interface - Scale Control // --------------------------------------------------------------------- // http://code.google.com/apis/maps/documentation/reference.html#GControlImpl.GScaleControl // http://books.google.com/books?id=9p5_XOgeOMYC&pg=PA73&lpg=PA73&dq=gscalecontrol+example+location&source=bl&ots=GO-F6NhOPX&sig=PeujK9zJPSbFqDw_xgHY4Lle54w&hl=en&ei=nDM5Svz4LYnEM5iyuJMN&sa=X&oi=book_result&ct=result&resnum=7 // Beginning Google Maps Mashups with Mapplets, KML and GeoRSS p. 73 // How to position the GScaleControl() control - see // http://groups.google.com/group/Google-Maps-API/browse_thread/thread/40feac500a308eff/27df5befcfe7a5a6?lnk=gst&q=GScaleControl#27df5befcfe7a5a6 map.addControl(new GScaleControl(), new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(6, 32))); // control to display map scale // GControlAnchor Options: // G_ANCHOR_TOP_RIGHT // G_ANCHOR_TOP_LEFT // G_ANCHOR_BOTTOM_RIGHT // G_ANCHOR_BOTTOM_LEFT // see http://code.google.com/apis/maps/documentation/reference.html#GControlAnchor // // GSize(width:Number, height:Number) in pixels // see http://code.google.com/apis/maps/documentation/reference.html#GSize // --------------------------------------------------------------------- // end Scale Control // ===================================================================== Thanks for all the assistance, JeffJensen On Jun 16, 1:16 pm, JeffJensen <[email protected]> wrote: > Hello Andrew and Ross, > > Thanks for the replies. > > Taking your suggestions on the my CSS positioning, I made the > following modifications as can be seen from > > http://faculty.unlv.edu/jensen/html/CSS/GoogleMapsAPI/divLogoFullPage... > > 1. When I use Mike's very helpful > tutorialhttp://www.econym.org.uk/gmap/basic19.htm > I end up getting scroll bars in the browser window. I think the > solution is to use the overflow: hidden; in the CSS declaration block > (note sure if it needs to be added to a combination of DIV, BODY and > HTML tags) but I didn't have success with IE 6. > > 2. Using a tip from Beginning CSS by Richard York, ISBN > 978-0-470-09697-0, p. 412. "For IE 6 to properly stretch the > absolutely positioned elements, it needs a bit of help." > > div#container { > width: expression(documentElement.offsetWidth - 5); > height: expression(documentElement.offsetHeight - 5); // 5 should be > in units of pixels > > } > > Now when I test my CSS in IE 6, IE 8 and FireFox 3 I get a nice Google > Map which fills and dynamically resizes to the width and height of the > web browser window. > > Switching topics, I'm still working on getting the new google.map AJAX > API to work since a majority of the documentation uses the older Gxxx > API. > > Thanks again for the help, > > JeffJensen > > On Jun 15, 3:30 pm, Andrew Leach <[email protected]> > wrote: > > > On Jun 15, 6:57 pm, JeffJensen <[email protected]> wrote: > > > > Here is a link to my > > > site:http://faculty.unlv.edu/jensen/html/GoogleEarth/divGoogleBarLogoHeade... > > > 2. when you adjust the size of the web browser window, a new scale bar > > > will appear on top of the Google Search Bar. How can I stop this > > > behavior? > > > > I'm using FireFox 3.0.11 on WinXP computer. > > > I can't reproduce that in FF 3.0.11 under WinXP. It all seems to work > > well. > > > The problem with IE6 which Ross found is probably due to not giving > > the map div any dimensions. You need to specify width and height in > > IE6, which can cause problems with filling things to 100% of the > > height. See Mike's tutorialhttp://www.econym.org.uk/gmap/basic19.htm > > > 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 -~----------~----~----~----~------~----~------~--~---
