On Dec 2, 8:50 am, matttr <[EMAIL PROTECTED]> wrote: > Hi there, > > I am in the process of finishing off a map of my companies > international offices. The map itself works, but I was asked to > include functionality so that we could provide a link that loaded the > map with a specific region selected. I have done this with code that > reads the URL for an id that corresponds with the region. My problem, > however, is that I would like the map to center and zoom based on the > markers for that region. I seem to have been able to get this to work > except that the auto center and zoom functions seem to be including > markers even though they are hidden. > > For example, by following this > linkhttp://www.edc.ca/english/mediaroom_14150.htm?id=red > you will be shown the markers for the offices in China. You will > notice that it does not center or zoom in on them and this is because > it is including other markers. > > If you could look at my code and tell me how I can get it to stop > reading these hidden markers I would greatly appreciate it. > > The JS is athttp://www.edc.ca/scripts/regional_map_java_e.js > > I have looked at this in IE6, Firefox, and Chrome and it has the same > results across the board. > > Thanks for any help.
You have a local bounds variable inside your toggleGroup function which is updated by processing through the markers. Then you use the value of the global one (which contains all the markers) to set the center and zoom level of the map. -- Larry --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to Google-Maps-API@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---