title: Error when installing packaged version of WinJS Windows 8.1 app using Bing Maps
body: <p>I've developed a Windows 8.1 app using the blank universal template. The app uses Bing Maps and runs fine when debugging using visual studio.</p>
  
  <p>However, when I package and install the app locally, is fails with the following error:</p>
  
  <blockquote>
    <p>Exception is about to be caught by JavaScript library code at line 1,
    column 202459 in ms-appx:///Bing.Maps.JavaScript//js/veapicore.js</p>
    
    <p>0x800a138f - JavaScript runtime error: Unable to get property
    'replace' of undefined or null reference</p>
  </blockquote>
  
  <p>Obviously this is some sort of issue with how I'm using or have referenced the Bing Maps api. </p>
  
  <p>I've including Bing Maps using the following script references in my default.html file:</p>
  
  <pre><code>&lt;script type="text/javascript" src="ms-appx:///Bing.Maps.JavaScript//js/veapicore.js"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript" src="ms-appx:///Bing.Maps.JavaScript//js/veapiModules.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>The exception is happening when I go to initially create the map:</p>
  
  <pre><code>this.map = new Microsoft.Maps.Map(mapElement, mapOptions);
  </code></pre>
  
  <p>It looks right according to all the documentation I've looked at. Any ideas why it would run fine in the visual studio debugger but fail when packaged and installed? Am I missing something that needs to be included in the package?</p>