Carl,

Yes i know that feeling. I find it really annoying that the basic
tutorials do not exist and it does hinder newbies. You would think
that with the number of people with one location a basic tutorial
would exist showing people how to add 1 custom marker and 1 custom
info window onto a map. Like you I find the examples and demos
overkill. Rant over but in answer to your question to add a custom
marker and in this case I have added a .png marker converted to a
movie symbol with a class name of "marker" on the map the following
script will work. I do not know actionscript that well either so
hopefully someone will post any corrections if need be.


import com.google.maps.LatLng;
import com.google.maps.Map;
import com.google.maps.MapEvent;
import com.google.maps.MapType;
import com.google.maps.controls.MapTypeControl;
import com.google.maps.controls.ZoomControl;
import com.google.maps.controls.PositionControl;
import  com.google.maps.overlays.Marker;
import com.google.maps.overlays.MarkerOptions;

var map:Map = new Map();
map.key = "YOUR API KEY";
map.setSize(new Point(stage.stageWidth, stage.stageHeight));
map.addEventListener(MapEvent.MAP_READY, onMapReady);
this.addChild(map);

function onMapReady(event:Event):void {
  map.addControl(new ZoomControl());
  map.addControl(new PositionControl());
  map.addControl(new MapTypeControl());
  map.setCenter(new LatLng(55.960618, -3.165113), 14,
MapType.NORMAL_MAP_TYPE);
  var m:Marker = new Marker(new LatLng(55.960618, -3.165113),
  new MarkerOptions({icon:new marker()}));
  map.addOverlay(m);
}

-- 
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.

Reply via email to