Hello Im doing a map using this api and Flash 3. I want to use custom
icons, but i have problems with GIcon class. This is my code:

import com.google.maps.Map;
    import com.google.maps.LatLng;
    import com.google.maps.MapEvent;
    import com.google.maps.MapType;
    import com.google.maps.overlays.Marker;
        import com.google.maps.overlays.MarkerOptions;
        import com.google.maps.MapType;
        import com.google.maps.LatLng;
        import com.google.maps.styles.FillStyle;
        import com.google.maps.styles.StrokeStyle;


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

function onMapReady(event:MapEvent):void {
  // Creamos nuestro icono de marcador "pequeño".
var blueIcon = new GIcon(G_DEFAULT_ICON);
blueIcon.image = "http://www.google.com/intl/en_us/mapfiles/ms/micons/
blue-dot.png";

// Configuramos nuestro objeto GMarkerOptions.
markerOptions = { icon:blueIcon };

// Añadimos 10 marcadores al mapa en ubicaciones aleatorias.
var bounds = map.getBounds();
var southWest = bounds.getSouthWest();
var northEast = bounds.getNorthEast();
var lngSpan = northEast.lng() - southWest.lng();
var latSpan = northEast.lat() - southWest.lat();
for (var i = 0; i < 10; i++) {
  var point = new GLatLng(southWest.lat() + latSpan * Math.random(),
    southWest.lng() + lngSpan * Math.random());
  map.addOverlay(new GMarker(point, markerOptions));
}
}

I dont know if I have to impor the GIcon class and what is this class.

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