Bug 12982 - Microsoft Virtual Earth map does not display (dev.virtualearth.net)
Summary: Microsoft Virtual Earth map does not display (dev.virtualearth.net)
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Evangelism (show other bugs)
Version: 523.x (Safari 3)
Hardware: Macintosh Intel OS X 10.4
: P2 Normal
Assignee: Nobody
URL: http://www.apartmentfinder.com/result...
Keywords:
: 16499 17049 18800 (view as bug list)
Depends on:
Blocks: 6519
  Show dependency treegraph
 
Reported: 2007-03-06 09:24 PST by Bobby Hays
Modified: 2008-12-23 13:16 PST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bobby Hays 2007-03-06 09:24:32 PST
From javascript console:
TypeError: Null value
http://maps.live.com/veapi.ashx?v=1.3.0908172755.52
Comment 1 David Kilzer (:ddkilzer) 2007-03-06 19:26:05 PST
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.

Comment 2 David Kilzer (:ddkilzer) 2007-03-06 19:41:23 PST
(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.

Comment 3 Roman Rudenko 2007-05-28 19:17:42 PDT
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.
Comment 4 David Kilzer (:ddkilzer) 2008-02-23 13:37:09 PST
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.

Comment 5 David Kilzer (:ddkilzer) 2008-02-23 13:37:41 PST
*** Bug 16499 has been marked as a duplicate of this bug. ***
Comment 6 David Kilzer (:ddkilzer) 2008-02-23 13:37:54 PST
*** Bug 17049 has been marked as a duplicate of this bug. ***
Comment 7 Tom Gilder 2008-04-29 14:08:23 PDT
*** Bug 18800 has been marked as a duplicate of this bug. ***
Comment 8 Robert Blaut 2008-12-23 05:22:12 PST
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
Comment 9 David Kilzer (:ddkilzer) 2008-12-23 13:16:57 PST
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.