As a workaround, we're deleting google.loader before loading the
second jsapi script.

This feels fragile.  Let me know if there is a better alternative.

Thanks,
Tim

On Apr 12, 11:49 am, Tim Schaub <[email protected]> wrote:
> Hello-
>
> I'm curious to hear if there is a way to provide a loader API key
> after a "http://www.google.com/jsapi"; script has been added to a
> document.
>
> We've got an application with two independent components.  One uses
> the Maps v3 API and the other uses the Earth API.  The first one
> doesn't require an API key.  The second one does.  We don't strictly
> control with component is initialized first.  Whichever initializes
> first adds the jsapi script to the document.
>
> In cases where the earth component initializes first, it appends a
> script to the doc head with an API key and things work.  In cases
> where the maps component initializes first, it appends a script
> without an API key and then the earth component doesn't work.  This
> happens even if the earth component appends a second jsapi script to
> the document with a valid key.
>
> So I'm hoping there is some way to provide an API key only when an API
> that requires a key is loaded.
>
> Thanks for any tips,
> Tim

-- 
You received this message because you are subscribed to the Google Groups 
"Google AJAX APIs" 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-ajax-search-api?hl=en.

Reply via email to