Internet Explorer problems on olwidget.js

27 views
Skip to first unread message

Roberto Maurizzi

unread,
Jan 26, 2011, 10:59:45 AM1/26/11
to olwidget
Hello all,

Unfortunately I have to show olwidget-managed maps to people using
Internet Explorer 8 :-) and I've found 3 problems.

The first, quite easy to fix, is that IE won't load olwidget.js
reporting an error on line 1054 char 9.
It seems it doesn't like a comma on the last line of "var context"
definition. Removing the comma allows IE to display the map.
This is the diff.

--- olwidget.js.orig 2011-01-26 18:48:42.638999309 +0400
+++ olwidget.js 2011-01-26 17:24:34.294083380 +0400
@@ -1050,7 +1050,7 @@
var context = {
"inputElem": input,
"layer": layer,
- "layerSwitcher": this,
+ "layerSwitcher": this
}
OpenLayers.Event.observe(input, "mouseup",

OpenLayers.Function.bindAsEventListener(this.onInputClick,

The second problem is with clusters visualization: IE shows no numbers
inside the placeholders, or better, it shows only a very small part of
the number's character, the other part is hidden.
A demo image of the problem is here: http://www.digitalpha.it/images/clusters.png
. I'm using Microsoft VE, but OSM shows the same.
I have this problem in both my own map templates and in the admin
interface.


The third problem is that, only with MS VE maps, the browser reports
the following HTML parsing error:

--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--
Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64;
Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR
3.0.30729; Media Center PC 6.0; HPNTDF)
Timestamp: Wed, 26 Jan 2011 21:46:29 UTC


Message: HTML Parsing Error: Unable to modify the parent container
element before the child element is closed (KB927917)
Line: 0
Char: 0
Code: 0
URI: http://127.0.0.1/teammap/43

--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--

This error is shown for maps in my templates and also in the GeoAdmin
for a view, for both osm and ve maps.
You can find the KB article here http://support.microsoft.com/kb/927917/
This error does not seem to cause any additional problem, since the
map works and the error is only shown as a warning icon on the status
bar if it isn't hidden, I'm only reporting it because it could be
related to the previous one.


Ciao,
Roberto

Charlie DeTar

unread,
Jan 26, 2011, 7:13:42 PM1/26/11
to olwi...@googlegroups.com
On 01/26/2011 10:59 AM, Roberto Maurizzi wrote:
> --- olwidget.js.orig 2011-01-26 18:48:42.638999309 +0400
> +++ olwidget.js 2011-01-26 17:24:34.294083380 +0400
> @@ -1050,7 +1050,7 @@
> var context = {
> "inputElem": input,
> "layer": layer,
> - "layerSwitcher": this,
> + "layerSwitcher": this
> }
> OpenLayers.Event.observe(input, "mouseup",

Thanks, I just pushed this fix. Python habits creeping into javascript;
and IE is less tolerant than other browsers of this syntax error.

Thanks for the below bugs too. I'll try to replicate these tomorrow
when I get to a machine with a Windows VM.

best,
Charlie

Roberto Maurizzi

unread,
Jan 27, 2011, 3:39:01 AM1/27/11
to olwi...@googlegroups.com
> Thanks, I just pushed this fix.  Python habits creeping into javascript;
> and IE is less tolerant than other browsers of this syntax error.

Thank you for your work! :-)

> Thanks for the below bugs too.  I'll try to replicate these tomorrow
> when I get to a machine with a Windows VM.

Regarding the other bugs I just noticed I made a mistake reporting something. Regarding the HTML error I said:

> This error is shown for maps in my templates and also in the GeoAdmin
> for a view, for both osm and ve maps.
 
It only shows up for VE maps, OSM one are fine.


Roberto

Charlie DeTar

unread,
Jan 29, 2011, 10:24:23 AM1/29/11
to olwidget
Hi,

I tried to replicate the problems displaying text labels over clusters
when using VE maps, but I didn't find a problem. Here's the test file
I made:

http://dpaste.org/Oj0m/

Can you send html of a minimal failing test case? That'd help me try
to identify the issue.

best,
Charlie

Roberto Maurizzi

unread,
Jan 31, 2011, 2:17:38 PM1/31/11
to olwi...@googlegroups.com


2011/1/29 Charlie DeTar <cha...@gmail.com>
I'm sorry I disappeared but the last few days have been really busy.
I did some more tests and I probably found the problem: only some IE browsers have the problem, and up until now all of them were running on computers with... arabic language support ^_^;

Since Django I18N is enabled it's quite likely that the numbers go out of the dot because they're rendered in right to left direction.
I hope to have some time to test what happens if I add your map code to a Django template with and without I18N enabled on an Arabic Windows computer.


Roberto

Roberto Maurizzi

unread,
Feb 2, 2011, 6:07:20 AM2/2/11
to olwi...@googlegroups.com
 
Since Django I18N is enabled it's quite likely that the numbers go out of the dot because they're rendered in right to left direction.

I did some tests on a fully arabic computer with IE 8.0.6x and the results are quite funny!  :D

1) the clusters are ok, since they now display arabic script numbers that go in the right "direction" and are showed inside the circles.
2) Microsoft Bing Maps does *not* work correctly: within olwidget the map doesn't appear, showing no errors at all. On http://maps.bing.com it's even better: the tiles are showed right to left, so the order of the map is completely mixed up! :-D
3) OpenStreetMaps works correctly

I'd say in the end the problem lies somewhere between IE and Bing/VE maps, not in olwidget or OpenLayer, or that the bugs in these 2 systems don't allow us to see if there's something wrong also in the open sourced ones ;-)

Thak you,

Roberto

Reply all
Reply to author
Forward
0 new messages