Are you sure you specified the domain information for your website when you created your maps API key and that your movie is being loaded from either the root or a sub directory of your web site domain? For example:
Gen an API key for *www.yourdomain.com *Place your movie in a directory that resolves as * www.yourdomain.com/httpdocs/myflashmovie.swf * On Mon, Apr 18, 2011 at 6:20 AM, GARETH REYNOLDS <[email protected] > wrote: > Working through the examples to get my flash map working, It seems to > work when i test it off the webserver but when i put it on the > webserver it shows Initialization failed: please check the API key, > swf location, version and network availability. When i've published > the .fla i've Changed the property to Allow Network Access Only, but > still not working. Below is my as3 code. > > <maps:Map xmlns:maps="com.google.maps.*" id="map" > mapevent_mapready="onMapReady(event)" width="100%" height="100%" > > > key="ABQIAAAAolq29zebh2UToyImwfTE5BRHKtA0g4z6A2TcCWEuclqQutwpehQHJWxM3M7NH96Qnv2eD_w9IM87OQ"/ > > > > > import com.google.maps.LatLng; > import com.google.maps.Map; > import com.google.maps.MapEvent; > import com.google.maps.MapType; > > var map:Map = new Map(); > map.key = > > "ABQIAAAAolq29zebh2UToyImwfTE5BRHKtA0g4z6A2TcCWEuclqQutwpehQHJWxM3M7NH96Qnv2eD_w9IM87OQ"; > map.sensor = "true"; > map.setSize(new Point(stage.stageWidth, stage.stageHeight)); > map.addEventListener(MapEvent.MAP_READY, onMapReady); > this.addChild(map); > > function onMapReady(event:Event):void { > map.setCenter(new LatLng(40.736072,-73.992062), 14, > MapType.NORMAL_MAP_TYPE); > } > > -- > You received this message because you are subscribed to the Google Groups > "Google Maps API For Flash" group. > To post to this group, send email to > [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-maps-api-for-flash?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Maps API For Flash" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-api-for-flash?hl=en.
