1 Reply Latest reply on Aug 20, 2009 10:43 AM by Jeff Swartz

    AIR not accessing online Javascript library?? HELP PLS SOMEONE!!!

    IrishAIRMax Level 1

      Hi everyone,


      I have air app which I am trying to connect with the yahoo/bing maps api (javascript library)


      But i keep on getting reference errors as if the AIR app is not retreiving the yahoo/bing map libraries?


      Or is it that these Javascript libraries have to be saved somewhere special as the app cannot use tham when they are in a certain sandbox?


      I don't know and the is wrecking my head! Both working in normal html page through dreamweaver.... so they should work in AIR, but they don't, the code is:


      <script type="text/javascript" 
      <script type="text/javascript" src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2"></script>
      <style type="text/css"> 
      height: 100%;
      width: 50%; 

      height: 100%; 
      width: 50%; 
      <div id="yahooMap"></div> 
      <div id="bingMap"></div> 
      <script type="text/javascript"> 
          // Create a map object 
          var map = new YMap(document.getElementById('yahooMap')); 
          var bmap = new VEMap('bingMap');
          // Add map type control 
          // Set map type to either of: YAHOO_MAP_SAT, YAHOO_MAP_HYB, YAHOO_MAP_REG 
            var farinefive = new VELatLong(45.5, -73.54);
            bmap.LoadMap(farinefive, 17);
          // Display the map centered on a geocoded location 
          map.drawZoomAndCenter("San Francisco", 3); 



      The error are :


      "ReferenceError: Can't find variable: YMap"

      "ReferenceError: Can't find variable: VELatLong"

      "ReferenceError: Can't find variable: VEMap"



      Thank you all in advance