2015-05-17 25 views
0

我試圖將mapquest地圖添加到我的Flash應用程序,但它只發布空白的swf。我已經導入了最新的Mapquest服務SWC文件,我有鑰匙,和我用我的Mapquest服務網站上找到的代碼:使用AS3添加MapQuest地圖

import flash.display.Sprite; 
import flash.display.StageScaleMode; 
import com.mapquest.tilemap.*; 


     //turn scaling off 
     this.stage.scaleMode = StageScaleMode.NO_SCALE; 

     // create a new TileMap object, passing your platform key 
     var map:TileMap = new TileMap("MY KEY HERE"); 

     //set the size of the map 
     map.size = new Size(600, 450); 

     //add the map to the sprite. 
     addChild(map); 

我要去哪裏錯了?

回答

0

您是否使用Open Flash Maps API和您的免費&開放API密鑰?

+0

不,我正在使用企業密鑰。上述示例僅適用於Free&Open API密鑰? – oddfather

+0

啊,看起來你正在使用Flash地圖API而不是Flex。您的庫中是否有以下路徑:flex_sdk/4.6.0/frameworks/libs/core.swc和Mapquest API MQFlashMapsAPI_7.1.5_MQ.swc? – jharahush