First, I am embarrased to be posting an IE problem - I am sorry. But I swear there is no reason for my map to be acting the way it is. I'm linking to the whole script - it is well commented. The problem I am having is that IE is taking forever to render all the markers on the map. The eventually do, but it takes minutes.
If nothing seems to happen at first, go away for a few minutes and then come back, there will be hundreds of blue dots as there should be.
My running guess is that this is related to addOverlays, or maybe this.reOrderOverlays(); inside addOverlays???
I figure this because the map seems to go through processing the XML and adding the markers to the list of markers fine...there is a statement on the site that appears when this is done "Station Data Loaded", which is called from in my version of addOverlays. but the markers still have yet to be drawn...thats why I think its hanging on reOrderOverlays();
Also, this problem is new from sometime in the past ten days or so....not sure, but it is new.
For some odd reason, when your map loads (Mozilla on a Mac) it looks fine but several seconds later, all the little icon marks turn into much bigger circles, probably 20px or more in diameter. They look fuzzy and are an aqua sort of color, like a swimming pool that hasn't had anything added to it but dirty children for a hot summer month.
yeah its ok! Note the version number - this is just a test version -
the blue dots are to make it easy to see what is going on. The code is
also striped down on this version to make trouble shooting easier!
One thing that you're doing that's different from what most people have
tried is that you're using GIF files for your markers.
Perhaps the Google code is trying to do something clever in IE that only
works with PNG files (which wouldn't be necessary in other browsers that
have better PNG partial transparency handling) and might be thereby
raising and eventually successfully handling lots of exceptions.
I don't see anything wrong with it but give my new tool print_r a crack at it
You could break in your loop and do object.print_r('object') and view the object itself. it is not as useful in IE because you have to scroll down all the time but it should help you fix this problem.
it's certainly not a GIF problem only; my map is using a very simple method of showing a "loading" message, as well as PNGs, but the "loading" message disappears LONG before the markers are actually fully loaded.
in fact, it seems that the "loading" message disappears once the markers START to show up on the map. while I'm more concerned about getting the "loading" message to stay there until all the markers are loaded, I'm still bothered by how long IE takes to load (given the addOverlays function).
yep - its not the gifs - I just replaced them with a all solid 24 png...and still stalls.
you can see in the script that the load message gets changed after the addOverlays function is called...it is the last part of that function. but it might be that reOrderOverlays is still chugging along.in the background.
kwesi I am looking at your script now.
Maybe I should just build this again from the ground up...nobody else is having a problem with addOverlays I guess?
im making a lot of changes to the 1.4 verion right now. I am still having issues. I got it loading fast when using the default icon, but when I add a custom icon now it is dragging on a new load. I am closing the browser down and launching fresh with each step.
I must not be understanding something - when I use google's defaut icon I have no problem, the map loads fast in IE. When I use my own custom icon it chokes in IE, but works in Firefox.
I wonder if this has anything to do with the fact that each icon has to be loaded as a separate server request for each marker. While strange and seemingly wasteful, it's doing that. I saw in your code (or one example of it) that you are using the google shadow image, which speeds things up. If you have access to another server, try putting your icons on it, or spread them out to several servers and see if that makes any difference.
I noticed that IE also sometimes calls for a null request from the server, which might cause other problems.
hmmm....I really dont know much about it. I can try moving the image to another domain, which I guess IE would think is another server. But that seems completely rediculous. It also seem kind of rediculous that IE would not cache the image and then just reference that, instead of re-downloading the same thing each time.
1) get rid of the transparent property on your icon or add an imageMap
property this may be causing probs..
2) try caching the image when the page loads with the little known
Image Object
like so
var myicon = new Image(pixelWidth, pixelHeight);
myicon.src = 'somepicture.png';
thats it the browser will download the picture in the background and
when IE goes to render the markers it will already be there..
I'll try the caching! thanks! I thought the transparent property was explicitly FOR IE....it creates the hit area, as i guess IE does not recognize the imageMap....from the documentation of the GIcon class:
transparent The URL of a virtually transparent version of the foreground icon image used to capture IE click events. This image should be a 24-bit PNG version of the main icon image with 1% opacity, but the same shape and size as the main icon.
ok - mine isn't the same size and shape, but it is 1% opacity. I wouldn't think that would damage the load...ugh - guess I have to go check this.
imageMap An array of integers representing the x/y coordinates of the image map we should use to specify the clickable part of the icon image in non-IE browsers.
Just a wild idea, but you might try not defining staticon.transparent.
The .transparent is only used in IE, so it won't affect Firefox etc.,
they use .imageMap instead (which you don't define, so by not defining
either of them you won't lose any functionality in IE that you've got in
FF).
IE might possibly not like the fact that it's currently not the same
size as staticon.image.
I killed the transparent reference which definately helps keep IE from
freezing up during load. But the icons still crawl in. I have the
caching set up like so now, per kwesi, but it does not seem to make a
difference.
all of this would be good enough for now, but when I throw in a
tranparent gif as the icon, which I need...my markers are really
transparent hit areas....when I use a 100% transparent gif IE losses
the clickability and it chokes on a 1% png...do I need to define an
imageMap, woudl that give me a transparent hit area in IE?