Problème de chargement de l'API

29 views
Skip to first unread message

Ronald Diquélou

unread,
Dec 20, 2011, 5:37:26 PM12/20/11
to google-map...@googlegroups.com
Hello,

I worry a load of your API.
My web application uses a lot of AJAX. I want to use Google Maps only a fewlocations. So I would load the Google Maps scripts only when I load these pagesin AJAX.

But when I want to use the API, it does not work. I feel that the API is proficient in charge.
When I inspect one of "google.maps" I have the following three elements when I should be many more.
  • Object modules = {}
  • Load = function ()
  • __gjsload__ = function ()

And when I load the same page and I'm not AJAX, everything works fine.

Here is the code I use to load the API.
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"> </ script>

Luke Mahé

unread,
Dec 20, 2011, 5:39:50 PM12/20/11
to google-map...@googlegroups.com
Hi Ronald,

Are you able to include a link to your demo?

Thanks

-- Luke


2011/12/21 Ronald Diquélou <van...@gmail.com>

--
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/-/5RqEeVI-mIYJ.
To post to this group, send email to google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Rossko

unread,
Dec 20, 2011, 8:56:23 PM12/20/11
to Google Maps JavaScript API v3
> Here is the code I use to load the API.
> <script type="text/javascript"
> src="http://maps.google.com/maps/api/js?sensor=false"> </ script>

If you are loading "via AJAX" I guess you are inserting that in the
page after page load is complete.
There is a recommended way to do that
http://code.google.com/apis/maps/documentation/javascript/basics.html#Async
which you should follow.
Note the use of a 'callback' parameter, which changes the way the
bootstrap works.

Ronald Diquélou

unread,
Dec 21, 2011, 4:43:54 AM12/21/11
to Google Maps JavaScript API v3
Thank you for the link, I had not seen.
Now it works correctly.

It's not easy to manage, but it's my choice to want to load the API
loading my page in AJAX.

Thank you again.
Reply all
Reply to author
Forward
0 new messages