I think you can do it the way you've done or you also use a 'normal'
load event. And in the function you'd need to define separate
varibales for every map

function handleApiReady() {

map_opts = {...} // options for first map

// first map
var map = new google.maps.Map(document.getElementById("map_canvas1"),
map_opts);

// and so on...

map_opts2 = {..} // options for second map

// second map
var map2 = new google.maps.Map(document.getElementById("map_canvas2"),
map_opts2);

// and so on...

}






On Jun 20, 4:32 pm, Archia <[email protected]> wrote:
> OK, given that the handleApiReady() function is called with:
>
>  <script type="text/javascript" src="http://maps.google.com/maps/api/
> js?sensor=false&callback=handleApiReady"></script>
>
> ...how do I pass the variables to it? Javascript is not very familiar
> to me.
>
> Thanks for the help.
>
> On Jun 20, 10:01 am, Pil <[email protected]> wrote:
>
> > You still have two functions with the same name and still loading the
> > API twice.
> > It doesn't matter that the functions are inside two different script
> > tags, I'd guees that the second function overwrites the first one.
>
> > You don't need two functions, just one is enough. But you need
> > different variables for different maps (and different variables for
> > the map options - if the options should be different).
>
> > On Jun 20, 3:45 pm, Archia <[email protected]> wrote:
>
> > > The API call in the document head of the test page 
> > > (http://www.frankkoonce.com/test.php) has been removed, and a single call 
> > > to
> > > the API occurs just after the first handleApiReady() function. This
> > > results in the first map displaying, but not the second. Also, to
> > > combine the contents of the handleApiReady() functions I would pass
> > > variables to it for latitude and longitude, correct?
>
> > > On Jun 20, 8:34 am, Pil <[email protected]> wrote:
>
> > > > On Jun 20, 2:05 pm, Chad Killingsworth
>
> > > > <[email protected]> wrote:
> > > > > Woah you are loading the API twice
>
> > > > More "woah", I've seen that the API is loaded thrice. Two times
> > > > 'normal', once using an extra callback...

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.

Reply via email to