1

Closed

JavaScript error in GetYahooHtml method of Maps helper in IE 10

description

To reproduce this issue, follow these steps:
  1. In a Razor web site, install the latest ASP.NET Web Helpers Library version using NuGet.
  2. On a CSHTML page that references JQuery, add the following. (Please replace the API key below with your own.)
@Maps.GetYahooHtml("0cQWWb_V34HU3tBuGguN84FewHcSy7RP2Rnt.O3F9ujDhz4khuQc51tKo5O4CS810NIGe86fzutPASnFC9W86vPEZ7IO6m8-", "Seattle")
  1. Request the page in IE 10 on Windows 8 RTM.
Result: The map fails to load due to a Javascript error in one of the files the hemler pulls down; the error in ymapapi_3_8_2_8.js (at line 4, column 100940) has the error message "Unable to get property 'add' of undefined or null reference."

I'm putting this here for completeness and to track this issue for other developers and users; the code we're generating is identical to what's recommended by Yahoo! at http://developer.yahoo.com/maps/ajax/ . The error one gets appears to be in code maintained by Yahoo! and presumably can only be realistically fixed there.
Closed Apr 19 at 6:49 PM by yishaigalatzer
This issue is in the Yahoo API and the MapQuest API and not in WebPages.

As a side note: IE10 does support this in compatibility mode.

comments

ClayCompton wrote Aug 24, 2012 at 4:04 AM

There's an identical error in the MapQuest helper method as well. Again, this issue only affects IE10 on WIndows 8; other browsers (including other IE versions) are unaffected.