# Google Maps problem ! Initialization failed: please check the API key, swf location,

**URL:** https://forum.kirupa.com/t/google-maps-problem-initialization-failed-please-check-the-api-key-swf-location/327623
**Category:** Uncategorized
**Created:** [March 15, 2012, 9:33am UTC](https://forum.kirupa.com/t/google-maps-problem-initialization-failed-please-check-the-api-key-swf-location/327623 "2012-03-15T09:33:41Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![hagop](https://avatars.discourse-cdn.com/v4/letter/h/97f17d/32.png) [@hagop](https://forum.kirupa.com/u/hagop)
#### Post date: [March 15, 2012, 9:33am UTC](https://forum.kirupa.com/t/google-maps-problem-initialization-failed-please-check-the-api-key-swf-location/327623/1 "2012-03-15T09:33:41Z")

</div>

Hi all

I am using CS4 AS3. Google maps works fine when I ran it locally, but when I port my swf file to the domain ([www.armenaki.com](http://www.armenaki.com)) I get the following error

_Initialization failed: please check the API key,swf location, version and network availability._

I know that Google has depreciated Google Maps API for Flash and does not generate new APIs. But then again, how come it works locally???  
Is it a proxy problem at [www.godaddy.com](http://www.godaddy.com) ?  
I even added **map.url** but no help.

Below is the code for reference. Any help would be appreciated.

[FONT=arial narrow]var map:Map = new Map();  
map.url = “[http://www.armenaki.com](http://www.armenaki.com)”;  
map.key = “”;  
map.sensor = “false”;  
map.setSize(new Point(stage.stageWidth, stage.stageHeight));  
map.addEventListener(MapEvent.MAP\_READY, onMapReady);  
map.width = 400;  
map.height = 300;  
map.y = 75;  
this.addChild(map);

function onMapReady(event:Event):void  
{  
map.setCenter(new LatLng(35.15447,33.37282), 14, MapType.NORMAL\_MAP\_TYPE);  
map.addControl(new ZoomControl());  
}  
[/FONT]
