On Jan 28, 2:43 am, Mr J <[email protected]> wrote: > Hi all, > i'm building a Google map searcher, the first displayed map is big, > the user performs a search for a zipcode, the result is the first > 10 closest location to this zipcode. > my problem is the small map after the search, i did not manage to > fit the 10 markers to zoom, the markers are zoomed out. > here is the link for more info: > http://www.na.pharmeon.nl/pages/LocatieZoeker.asp?articleid=100634&to... > > if you search for this zipcode : 1101bn then you should see the > sidebar on the right and the small map in the left. > first i tried to adjust the size of the map when the user click on > Zoek but then i did not manage to fit the markers on the zoom > level and after that i created another instant of the map called > smallMap below the big map, the problem with this is: if the small > map is hidden then the result after the search is not showed > correctly but if the small map is showing then i get the wanted > results, of ocurse i can not show the small map in the beginning. > > i'm using Mike's example but i did not manage to make it work (http:// > econym.org.uk/gmap/basic14.htm) > > thanks for taking a look and let me know if you find something. > let me know if it is not clear.
Sounds like the "hidden div" problem. You need to either: 1. call map.checkResize after displaying the div and the browser can return the correct (non-zero) size or 2. if it is fixed size use the size option in the GMap2 constructor This comes up all the time, a search of the group for "top left" or "zero size" should give you lots of examples. -- Larry > > thanks again -- You received this message because you are subscribed to the Google Groups "Google Maps API V2" 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.
