I want to show a Google Map inside the contacts page of the Flash site
that I'm creating.
On the main timeline of my project I have 3 elements:
- menu bar
- logo
- pages' container
The pages' container is a moviclip which I use to show my pages by
adding and removing them inside it with addChild and removeChild.
Pages are movieclips exported as classes for AS3.
I've added GoogleMaps API to components' list and I've used the code
found "Google Maps and Flash" tutorial found on these pages.
Well, I successfully add the map inside the contacts page, the problem
is that as the maps is shown, the whole page disappears, only the manu
bar and logo stays on the stage. If I remove the map from the contacs'
page and republish the site, the page works correctly again (it
doesn't disappear).
This is the code I use for the map
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 = "my key";
map.sensor = "false";
map.setSize(new Point(370, 285));
map.x = 380;
map.y = 205;
map.addEventListener(MapEvent.MAP_READY, onMapReady);
this.addChild(map);
function onMapReady(event:Event):void {
map.setCenter(new LatLng(41.893932,12.488177), 14,
MapType.NORMAL_MAP_TYPE);
}
Which is the problem?
--
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.