Wasn't it HeHe who wrote:
>
>hello,
>
>GMarker has getIcon() but no setIcon() method.
>
>sure, it has setImage() method but every time when it is called the
>browser may open a HTTP session to fetch the image file, which wastes
>bandwidth.
>
>is it possible to request a new method like setIcon() that can replace
>a marker directly with a 'loaded' GIcon object.

There should be no difference in image fetching behaviour. As far as the 
browser is concerned, they both end up simply adding an <img> (or 
AlphaImageLoader filter in MSIE) to the page. If that image is in 
cache[1] the copy from cache will be used.

"Loading" the URL of an image into a GIcon() doesn't fetch the image. 
The image file only gets fetched when the map.addOveraly() is performed.

Consider preloading the images that you plan to use with .setImage().


[1] In sensible browsers, if a copy of the image is in the process of 
being fetched, the browser will wait for that fetch to complete. MSIE 
will issue wasteful multiple simultaneous fetches for the same image 
file.

-- 
Mike Williams
http://econym.org.uk/gmap



--~--~---------~--~----~------------~-------~--~----~
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