I have created my flash file and inserted the following action
script:-

import com.google.maps.Map;
import com.google.maps.MapEvent;
import com.google.maps.LatLng;
import com.google.maps.MapType;

var map:Map = new Map();
map.key = "XXXXXXXXXXXXXXX";
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(51.37206,1.13034), 14,
MapType.NORMAL_MAP_TYPE);
}

i have entered the longditude and latitude i need and works perfectly
fine.

The problem....

I have been trawling through the google help pages to find out how to
add zoom controls and the code they provide throws out errors when
testing the movie in flash and doesnt work when uploaded to the web.

I know im going wrong somewhere in the sense that im putting the code
in wrong!

on the google map controls page it says to insert the following code:-

private function onMapReady(event:MapEvent):void {
  setCenter(new LatLng(42.366662,-71.106262), 11,
MapType.NORMAL_MAP_TYPE);
  addControl(new ZoomControl());
  addControl(new PositionControl());
  addControl(new MapTypeControl());
}

ok, so i add this code to my action script in frame 1 and i get the
following error:-

scene1, layer 'actions', Frame 1, Line 16
1013: The private attribute may be used only on class property
definitions.
private function onMapReady(event:MapEvent):void {


any ideas?

many thanks in advance
--~--~---------~--~----~------------~-------~--~----~
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 google-maps-api-for-flash@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to