OK. But my problem is not "how to load a library later", but :

In a page if another extension installed on a joomla site (or other), have 
already loaded the google map api, and if I reload it with an other path, 
this will crash.

If the other extension use the old method : 
 maps.google.com/maps/api/js?sensor=true
And my extension use the right method : 
 maps.googleapis.com/maps/api/js?sensor=true

This generate javascripts errors in console, like "double load library my 
be cause error" and no map are displayed

The second problem, is if my ext need &libraries=places in addition.... 

:-/



Le jeudi 8 novembre 2012 09:45:36 UTC+1, Andrew Leach a écrit :
>
> On 8 November 2012 07:50, pec76 <[email protected] <javascript:>> wrote: 
> > I my question not clear ? 
> >> 
> >> What is the good practice to load only the needed code. For exemple If 
> I 
> >> need only to load the places library, because another extension has 
> already 
> >> laoded the map api ??? 
>
> Here's the documentation: 
> https://developers.google.com/maps/documentation/javascript/libraries 
>
> It doesn't look like you can add libraries once you have loaded the 
> API. The solution will be to load all the libraries you are likely to 
> need, although that does rather negate any benefit. 
>
> In fact, there's a feature request for just this functionality at 
> http://code.google.com/p/gmaps-api-issues/issues/detail?id=3664 to 
> which you can add your star to show you support it. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-maps-js-api-v3/-/w43Rq8lBACIJ.
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