Ok, I'm too naive. A newbie :-)

I have to put some images over the Google Maps. Then, I have a servlet
that gets the image from a database, and sends it to the application.
This is:

var icon = new GIcon();
icon.image = "http://myapp/getImage?id="; + imageId;

I want to repeat the call that obtains the image (the servlet call) to
prevent errors (timeout, net), because, sometimes, I lose some images
for communication problems. What's the correct way to do this?

Thanks in advance

Jorge

On 19 nov, 11:41, "warden [Andrew Leach - Maps API Guru]"
<[EMAIL PROTECTED]> wrote:
> On Nov 19, 9:28 am, "Michael Geary" <[EMAIL PROTECTED]> wrote:
>
> > No, that code won't work at all, for a few different reasons.
>
> > What is it you're trying to do there? Just create the GIcon and the GMarker
> > and add it to the map. You don't need to worry about whether the image has
> > been downloaded yet - let the browser take care of it.
>
> However, if you are adding lots of identical markers, browser caching
> may have a part to play. IE's policy on GET appears to be -- check the
> cache, if item is not present, issue request; when item is returned,
> add it to the cache. This means that it's possible to issue requests
> for hundreds of identical items before the first one returns and is
> added to the cache. Once that's happened, subsequent requests will use
> it, but there are still hundreds queued which didn't get a cache hit.
> FF is more sensible and checks the request queue as well, so it will
> get the second and every subsequent request from the cache.
>
> One way round this is to preload the image so that it's reached even
> IE's cache before even the first request for the map is issued.
>
> Andrew
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to