Re: Place a dot on map and format text in "info window"
That's a "feature" of IE. IE doesn't recognise that it has an
outstanding request to load the image, so if none of the current
requests have completed it will issue a new request for the image for
each marker.
Other browsers recognise that they have an outstanding request for the
image, and don't re-request it when you create more than one marker with
the same image.
One way to fix this is to pre-load the image in online code. IE will
then complete the fetching of the pre-load image before running the
onload function. When the onload function runs, IE already has a
complete copy of the image, so it doesn't request them again.
I think the preload code should look something like this:
var image1 = new Image();
image1.src = "http://www.satsig.net/maps/cross.png";
If you had other multiple images or shadows you would do the same for
each of those.
Remember that the preloading needs to be in inline code, not inside the
onload function, so that it can complete before the onload event is
triggered.
--
The Blackpool Community Church Javascript Team
http://www.econym.demon.co.uk/googlemaps/
0 Comments:
Yorum Gönder
<< Home