bhavikcloudguru / google-maps-utility-library-v3

Automatically exported from code.google.com/p/google-maps-utility-library-v3
Apache License 2.0
0 stars 0 forks source link

Marker cluster - Internet explorer Error - [Stop running this script] #93

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Demo link or sample code:
http://markercluster.leadhoster.com/markerclusterer/examples/advanced_example.ht
ml

What steps will reproduce the problem?
1.open the above link using IE browser
2.change the zoom levels

Expected result:
IE error. 

------
Stop running this script? 
A script on this page is causing Internet Explorer to run slowly.  If 
it continues to run, your computer may become unresponsive. 
-----  

Actual result:
we are getting an internet explorer error.

Version: 
3.3 google v3 map

Browser / Operating System:
Internet Explorer

Additional comments:
We are looking forward in to hearing from you guys soon.
thank you for all of your help

Original issue reported on code.google.com by benofe...@aol.com on 31 May 2011 at 10:50

GoogleCodeExporter commented 9 years ago
im experiencing a similar problem...can someone at google take care of this?

Original comment by RichardG...@gmail.com on 1 Jun 2011 at 3:52

GoogleCodeExporter commented 9 years ago
Bump

Original comment by robertsw...@gmail.com on 6 Jul 2011 at 1:07

GoogleCodeExporter commented 9 years ago
Which version of IE? Which version of Windows? What is the error message?

Original comment by garylitt...@gmail.com on 8 Jul 2011 at 4:29

GoogleCodeExporter commented 9 years ago
Dear Gary, 

Thank you for your attention! I really hope you can help with this..any help 
will be great!

-here's another link i created base on the above link that will bring up the 
issue:
http://markercluster.freezoka.net/test/markerclusterer/examples/advanced_example
.html

I tested it on my 3 computers...and also tested it on other computers not 
belong to my..facing the same outcome with.

here's the info of my 3 computers:
version of IE: 8.0.7600.16385
version of Windows: Windows 7 
error message: 
------
Stop running this script? 
A script on this page is causing Internet Explorer to run slowly.  If 
it continues to run, your computer may become unresponsive. 
-----  

version of IE: 8.0.7600.16385
version of Windows: Windows XP
error message: 
------
Stop running this script? 
A script on this page is causing Internet Explorer to run slowly.  If 
it continues to run, your computer may become unresponsive. 
-----  

version of IE: 7.0.5730.13
version of Windows: Windows XP 
error message: 
------
Stop running this script? 
A script on this page is causing Internet Explorer to run slowly.  If 
it continues to run, your computer may become unresponsive. 
-----  

Please note:
-the error only comes when i have 1000's of markers...
-everything works well with chrome and firefox
-other people had experiance similar problems with that error:
http://www.picnet.com.au/blogs/Guido/post/2010/03/04/How-to-prevent-Stop-running
-this-script-message-in-browsers.aspx
one of the solution is to break up the marker task into mutliple smaller tasks 
with a setTimeout in between these tasks. (but i dont want to touch the marker 
code)

Thank you so much for your time
Hope to hear from you soon.

Original comment by benofe...@aol.com on 8 Jul 2011 at 4:57

GoogleCodeExporter commented 9 years ago
I finally found a Windows computer... and I see what you mean. This is a real 
pain. No problem on my Mac with Safari.

Your tip on using setTimeout might work but would be very complicated to code, 
I'm sure. Still, I'll have a quick look.

Original comment by garylitt...@gmail.com on 8 Jul 2011 at 6:10

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi Gary,

Again thank you so much for your help. That is so nice of you!

I really hope you can help with that as the marker will be my main thing on the 
website.

Please note: at one point when zooming in....the error msg will go away as less 
markers displayed. 

thanks   

Original comment by benofe...@aol.com on 8 Jul 2011 at 8:59

GoogleCodeExporter commented 9 years ago
OK, I've got a version you can try that uses setTimeout to process markers in 
batches of 2000 at a time. Send me an email at gary@luxcentral.com so I can 
send it to you directly so you can try it out before I post it.

Original comment by garylitt...@gmail.com on 9 Jul 2011 at 5:53

GoogleCodeExporter commented 9 years ago
Hi Gary,
I sent you an email just a few moments ago form benofer90@aol.com , please let 
me know that you had received it

I will keep you posted just as soon as i test the ver.

Thank you again for your time!

Original comment by benofe...@aol.com on 9 Jul 2011 at 8:10

GoogleCodeExporter commented 9 years ago
Is there any chance of a test version being posted publicly, even on a beta 
basis? We have experienced this problem on IE7/8 on Windows 7 and XP, and would 
be more than happy to help test out improvements.

Regards!

Original comment by larstor...@gmail.com on 14 Jul 2011 at 4:30

GoogleCodeExporter commented 9 years ago
I'm waiting for the original author of the V3 version to endorse my proposed 
changes. If that happens I can post a new trunk version soon.

I've done some investigation and if you want to deal with around 16,000 
markers, you need to manage the markers in batches of 100 (on IE only) to avoid 
a timeout error. Of course, managing this many markers with IE is still very 
slow.

Original comment by garylitt...@gmail.com on 14 Jul 2011 at 9:36

GoogleCodeExporter commented 9 years ago
This should be fixed in MarkerClustererPlus:

http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerclustererplu
s/2.0/

Original comment by garylitt...@gmail.com on 20 Jul 2011 at 11:24

GoogleCodeExporter commented 9 years ago
Hi Gary,

Thank you so much for your time!

It works great with chrome! but not with IE...the page loads and the map 
doesnt...loading icon keep on running.

http://markercluster.freezoka.net/test/markerclusterer/examples/advanced_example
.html

Original comment by RichardG...@gmail.com on 21 Jul 2011 at 1:13

GoogleCodeExporter commented 9 years ago
I notice you have not set the new batchSizeIE property when creating your 
marker clusterer object. On IE, for this many markers, you may have to set it 
as low as 100. It's still going to take a while to iterate through the markers 
but you probably won't see a timeout error.

Original comment by garylitt...@gmail.com on 21 Jul 2011 at 4:06

GoogleCodeExporter commented 9 years ago
I tried an experiment using IE7 on Windows XP on a 3-yr-old tower computer (HP).

With 6,000 markers, I had to set batchSizeIE to 275 to avoid timeout errors.

With 16,000 markers, I had to set batchSizeIE to 100. However, when managing 
this many markers on IE, the time to update the map makes the map react too 
slowly to be usable. It might be better with IE8 or IE9, but I have my doubts. 
Every other popular browser for XP worked fine -- Chrome, FF, Opera, Safari.

If you need to deal with huge numbers of markers it would be better to 
investigate a Fusion Tables solution. Or insist people use the ABIE browser 
(Anything But Internet Explorer).

Original comment by garylitt...@gmail.com on 21 Jul 2011 at 6:13

GoogleCodeExporter commented 9 years ago
Hi Gary,

Hope you are having a nice day.

I tried an experiment using IE8 on Windows 7 on a 1-yr-old computer (lenovo).

http://markercluster.freezoka.net/test/markerclusterer1/examples/advanced_exampl
e.html

It works great with chrome! but not with IE...the page loads and the map 
doesnt...loading icon keep on running.

maybe it doesnt recognize the IE 8?

Original comment by benofe...@aol.com on 23 Jul 2011 at 5:16

GoogleCodeExporter commented 9 years ago
You still haven't set the batchSizeIE property in the options you pass when you 
create the marker clusterer. You now have 17,000 markers, so try setting 
batchSizeIE to 100.

Original comment by garylitt...@gmail.com on 23 Jul 2011 at 6:00

GoogleCodeExporter commented 9 years ago
Hi Gary,

Hope you are doing well!

I followed your instruction ....still getting similar results.

It works great with chrome! but not with IE...the page loads and the map 
doesnt...loading icon keep on running.

http://markercluster.freezoka.net/test/markerclusterer1/examples/advanced_exampl
e.html

Hope you can help.

Original comment by benofe...@aol.com on 25 Jul 2011 at 5:36

GoogleCodeExporter commented 9 years ago
Works perfectly well for me using Internet Explorer 9 and Windows 7.

Original comment by garylitt...@gmail.com on 25 Jul 2011 at 6:41

GoogleCodeExporter commented 9 years ago
Hi Gary,

Sorry maybe i didn't refresh the page correctly ..

WORKS AMAZING! thank you so much for the hard work! much appreciated.

B 

Original comment by benofe...@aol.com on 25 Jul 2011 at 9:50

GoogleCodeExporter commented 9 years ago
Hi Gary,

Sorry im coming back with a question.
one of my map options contains 37K markers...

Im getting the error again...i tried to set the batchSizeIE to 10
still getting the error. in the range of 16k all works great but in the range 
of 40k im getting the error.

i understand you had set it to call a new function on every batchSizeIE 
iteration kinda strange it wont work for 40k markers..

HOPE you can help.

Thanks again for all of the time and work.
B 

Original comment by benofe...@aol.com on 26 Jul 2011 at 10:38

GoogleCodeExporter commented 9 years ago
this is an example i set to work with 40K markers and batchSizeIE to 10...
http://markercluster.freezoka.net/test/markerclusterer1/examples/advanced_exampl
e.html

Original comment by benofe...@aol.com on 26 Jul 2011 at 10:42

GoogleCodeExporter commented 9 years ago
Internet Explorer just doesn't have the horsepower needed to handle that many 
markers. As I said earlier, at about 16,000 markers the performance is barely 
tolerable. Things get very slow very quickly after that. This isn't an issue 
with the marker clusterer, it's an inherent deficiency in IE. 

You may want to try IE9 to see if it makes any difference.

Original comment by garylitt...@gmail.com on 26 Jul 2011 at 4:34

GoogleCodeExporter commented 9 years ago
Hi Gary,

Thank you for the quick reply!

Yes internet explorer is really doing a number on us....

I am trying to figure out whether the error msg is due to a function in the 
markerclusterer.js or the refreshMap() function in the advanced_example.html 
where the  for (var i = 0; i < 40000; ++i) is looping.

cus if i press ok in the error box telling IE to keep running the script 
everything works fine after, meaning after one "Ok" all is running fine. in the 
past i had to press 30-50 times... this is why im asking whether the problem 
might be in the refreshMap() -  for (var i = 0; i < 40000; ++i) ...

would you be able to tell? 

Hope to hear from you.

Original comment by benofe...@aol.com on 26 Jul 2011 at 5:22

GoogleCodeExporter commented 9 years ago
All I can suggest is that you reduce batchSizeIE even more. Try 90 or 80 and 
you may avoid the timeout error. It's still going to take a very long time to 
process 37,000 markers with IE.

Original comment by garylitt...@gmail.com on 26 Jul 2011 at 10:27

GoogleCodeExporter commented 9 years ago
Hi Gary,

what you had created with the batchSizeIE  is wonderful....but this specific 
error is before batchSizeIE is been created....

in other words..what you had fixed is great once the refreshMap() function is 
done. 
but with in the refreshMap() there is an array creation of markers = [] . 

changing the batchSizeIE to 90 or 80 will not help in this case as the error 
comes before the creation of:
markerClusterer = new MarkerClusterer(map, markers, {
          maxZoom: zoom,
          gridSize: size,
          batchSizeIE: 100,
          styles: styles[style]
        }); 

is there a way to impingement the same idea batchSizeIE to the refreshMap(). in 
particular to the: "for (var i = 0; i < 40000; ++i)" 

for (var i = 0; i < 40000; ++i) {
            var lat = 37.4419 + (Math.random()/0.5);
            var lng = -122.1419 + (Math.random()/0.5);
            var latLng = new google.maps.LatLng(lat,lng);

            var marker = new google.maps.Marker({
               position: latLng,
               draggable: true,
               icon: markerImage
          });
          markers.push(marker);
        }

* please see the new example i had created. the error comes before "alert()" 
function . after the alert function is called then batchSizeIE is set.

Hope you can help.

Again you time is very much appreciated. thank you!

B

Original comment by benofe...@aol.com on 27 Jul 2011 at 9:06

GoogleCodeExporter commented 9 years ago
this is an example i set to work with 40K markers and with the alert() before  
batchSizeIE is created 
http://markercluster.freezoka.net/test/markerclusterer1/examples/advanced_exampl
e.html

Original comment by benofe...@aol.com on 27 Jul 2011 at 9:08

GoogleCodeExporter commented 9 years ago
As you've noted, the problem occurs before you even create the marker 
clusterer. Internet Explorer is simply incapable of creating this many markers 
in a single loop.

Perhaps if you were to create the markers in batches (much like the clusterer 
updates markers) it would work. But that's a task for you, not the marker 
clusterer.

Again... I think you need to reconsider the propriety of handling so many 
markers on a map at once. Even with a fast browser it took 25 seconds to update 
the map after a zoom.

Original comment by garylitt...@gmail.com on 28 Jul 2011 at 8:58