4 Replies Latest reply on Aug 19, 2009 5:05 PM by Jeff Swartz

    yahoo maps not working in air? pls help!!! someone!!!

    IrishAIRMax

      Hi  everyone,

       

      I have created a partial air app and now i need a yahoo map.

       

      The code which I have works in dreamweaver when i test it as a normal web html file but does not work then when I use it in aptana studios for air apps.

       

      The code is :

       

      <head> 
      <script type="text/javascript" 
      src="http://api.maps.yahoo.com/ajaxymap?v=3.8&appid=myappid"></script> 
      <style type="text/css"> 
      #map{ 
      height: 100%; 
      width: 100%; 

      </style> 
      </head> 
      <body> 
      <div id="map"></div> 
        
      <script type="text/javascript"> 
           // Create a map object 
      alert('1');
           var map = new YMap(document.getElementById('map')); 
      alert('2');
           // Add map type control 
           map.addTypeControl(); 
        
           // Set map type to either of: YAHOO_MAP_SAT, YAHOO_MAP_HYB, YAHOO_MAP_REG 
           map.setMapType(YAHOO_MAP_REG); 
        
           // Display the map centered on a geocoded location 
           map.drawZoomAndCenter("San Francisco", 3); 
      </script> 
      </body> 
      </html>

       

      The error I am receiving is "ReferenceError: Can't find variable: YMap"

       

      can anyone tell me why?

       

      Thank you all so much in advance?

      IrishAirMax