earthoutreach / earth-api-utility-library

Automatically exported from code.google.com/p/earth-api-utility-library
0 stars 0 forks source link

computeBounds() not working in IE #21

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.
2.
3.

Please disregard Issue #20, written by me.  I have since found that the bug
is not reliant on existence of geometry associated with a feature (as
described in that ticket).

I have since associated a point with every placemark, and I tested every
placemark to make sure it has a legitimate lat/lon.  They all do.

I am performing a computeBounds() on every placemark in a folder.  It works
fine in FF and Chrome.

It does not work at all and reports a bug in IE.  At the point of failure,
it causes the application to crash.  The bug is described in IE's
"developer tools" as:

          extensions.pack.js, line 32, character 42701

I will be happy to share my source with you so that you can see what
triggers it.  In fact, I am going to try to attach the source now.  

In the source, you will see the pertinent lines to use to trigger and/or
work-around the bug.  They are the presently-commented lines 648, 649 and
654.  With these lines commented out, the bug will occur.  If you remove
the comments and allow the code to bypass computeBounds() if browser is IE,
then, it works fine, but of course not in IE.  It just prevent attempts to
computeBounds() if the detected browser is IE.

Here are the relevant lines:  

if (browser.search(/Internet Explorer/i)==(-1))
{
     //alert(browser.search(/Internet Explorer/i));
     //alert("Computing.");
     var bounds = gex.dom.computeBounds(folder);
     gex.view.setToBoundsView(bounds, {aspectRatio:2.3, scaleRange:2.5 });
}

I will be happy to share any other information and am looking forward to
helping to resolve this expeditiously.  Thanks.

Original issue reported on code.google.com by jmat...@gmail.com on 10 Nov 2009 at 8:25

Attachments:

GoogleCodeExporter commented 8 years ago
Issue 20 has been merged into this issue.

Original comment by api.roman.public@gmail.com on 12 Nov 2009 at 7:39

GoogleCodeExporter commented 8 years ago
Will get to this as soon as I have some time. If there's an easy fix, please 
feel free to 
submit a patch.

Original comment by api.roman.public@gmail.com on 12 Nov 2009 at 7:39

GoogleCodeExporter commented 8 years ago
Thanks for the reply.  I took a look at the source but have to admit I am too 
much of
a novice to decipher it.  I was able to partly decipher some of the properties 
of the
bounds object that was created, and I found that the following two properties 
seem to
be properly defined.

//alert(bounds.center());
//alert(bounds.span().lat);

Oddly, it used to generate an error message in IE, but now, it no longer does.  
It
still fails, though.

If I knew how to figure out what all the properties of the bounds object were
supposed to be, then, I could probably dig into it.

Original comment by jmat...@gmail.com on 18 Nov 2009 at 5:19

GoogleCodeExporter commented 8 years ago
This may be fixed in the latest trunk version:

http://earth-api-utility-
library.googlecode.com/svn/trunk/extensions/dist/extensions.pack.js

Original comment by api.roman.public@gmail.com on 29 Dec 2009 at 5:30

GoogleCodeExporter commented 8 years ago
I have been having problems with the packed version of the extensions with IE8,
switching to the non packed version has resolved the issues.

http://earth-api-utility-library.googlecode.com/svn/tags/extensions-0.2/dist/ext
ensions.js

Original comment by Berwyn.M...@gmail.com on 29 Dec 2009 at 11:16

GoogleCodeExporter commented 8 years ago
Yes, 2.0 packed is broken on IE8. The packed JS in trunk/dist should work fine 
though.

Original comment by api.roman.public@gmail.com on 5 Jan 2010 at 9:53