Bug 12982
Summary: | Microsoft Virtual Earth map does not display (dev.virtualearth.net) | ||
---|---|---|---|
Product: | WebKit | Reporter: | Bobby Hays <bhays> |
Component: | Evangelism | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | ddkilzer, gsherloc, tom, vicki, webkit, yael |
Priority: | P2 | ||
Version: | 523.x (Safari 3) | ||
Hardware: | Mac (Intel) | ||
OS: | OS X 10.4 | ||
URL: | http://www.apartmentfinder.com/results.aspx?CCountry=US&CPostalCode=30014&CMinPrice=-1&CMaxPrice=-1&CRadius=0&CSearchType=2 | ||
Bug Depends on: | |||
Bug Blocks: | 6519 |
Bobby Hays
From javascript console:
TypeError: Null value
http://maps.live.com/veapi.ashx?v=1.3.0908172755.52
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
David Kilzer (:ddkilzer)
Confirmed with a local debug build of WebKit r19993 with Safari 2.0.4 (419.3) on Mac OS X 10.4.8 (8N1037).
This is NOT a regression as shipping Safari doesn't work either.
David Kilzer (:ddkilzer)
(In reply to comment #0)
> TypeError: Null value
> http://maps.live.com/veapi.ashx?v=1.3.0908172755.52
The JavaScript console reports the error is on "Line 1". This is not helpful as the JS source for the above URL is all on one line.
Roman Rudenko
If you try using v5 of API instead, you will get a JS file that is not all one huge line. There, one can figure out the details:
http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=5 around line 799
...
if(a.UserAgent.indexOf("MSIE")!=-1){if(navigator.browserLanguage)a.Locale=navigator.browserLanguage;
if(navigator.userLanguage)a.Locale=navigator.userLanguage;
if(navigator.systemLanguage)a.Locale=navigator.systemLanguage}else if(a.UserAgent.indexOf("Gecko")!=-1){var c=new RegExp("; (.*); rv:"),b=c.exec(a.UserAgent);
if(b[1])a.Locale=b[1].substring(b[1].lastIndexOf(" "),b[1].length+1)}else if(a.UserAgent.indexOf("Opera")!=-1){var c=new RegExp(" (.*))"),b=c.exec(a.UserAgent);
if(b[1])a.Locale=b[1].substring(b[1].lastIndexOf(" "),b[1].length+1)}else a.Locale="en-US"}function k(){if(a.UserAgent.indexOf("Gecko")!=-1)a.Type=Msn.VE.BrowserType.Firefox;else if(a.UserAgent.indexOf("MSIE")!=-1)a.Type=Msn.VE.BrowserType.MSIE;else if(a.UserAgent.indexOf("Opera")!=-1)a.Type=Msn.VE.BrowserType.Opera;else a.Type=Msn.VE.BrowserType.Unknown;
...
As you can see, there is a misguided sniff for Gecko in the code. Since Webkit has a "(KHTML, like Gecko)" substring inside the user agent string, this detection goes into the wrong code path and dies in a fire.
David Kilzer (:ddkilzer)
Works when spoofing as Firefox 2.0.0.2. This is an evangelism issue. See also Bug 6519.
Tested using a local debug build of WebKit r30353.
David Kilzer (:ddkilzer)
*** Bug 16499 has been marked as a duplicate of this bug. ***
David Kilzer (:ddkilzer)
*** Bug 17049 has been marked as a duplicate of this bug. ***
Tom Gilder
*** Bug 18800 has been marked as a duplicate of this bug. ***
Robert Blaut
The reported issue is already fixed. New version of script works fine in the latest WebKit: http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.1
David Kilzer (:ddkilzer)
The page does work now with ToT WebKit.
Note that clicking on the "push pins" gives an error when trying to load <javascript://pushin%20hover>, but changing the href attributes to "#" fixes the issue. This doesn't seem to be a WebKit bug anymore.