i swear i never set them to be white text on a white backround :{
but ive trolled through all the code and cant seem to find how to set
the text attributes using the google classes..
maybe i need to set html = true in flash?
(used to have to do that way back in mx..not sure)
set a text format in flash ..? but you would think it would be Black
by defualt..
have done a trace for the variable htmlOut it is returning data..in
fact i can copy and paste it out of the map..
(i know its going to be so simple ill want to hit myself..but right
now i need a little help...pleeese)
url:
http://www.wird.com.au/steelcity/
((emededed in flash cs5))
as3 code
////////////////
import com.google.maps.LatLng;
import com.google.maps.Map;
import com.google.maps.MapEvent;
import com.google.maps.MapType;
import com.google.maps.InfoWindowOptions;
import com.google.maps.LatLngBounds;
import com.google.maps.MapMoveEvent;
import com.google.maps.overlays.Marker;
import com.google.maps.overlays.MarkerOptions;
import com.google.maps.controls.ZoomControl;
import com.google.maps.controls.PositionControl;
import com.google.maps.controls.ControlPosition;
import com.google.maps.controls.ZoomControl;
import com.google.maps.controls.ZoomControlOptions;
import com.google.maps.MapMouseEvent;
import com.google.maps.styles.FillStyle;
import com.google.maps.styles.StrokeStyle;
//import com.google.maps.Color;
import com.google.maps.services.*;
var map:Map;
//var skateIco:Class;
var customIcons:Object = { "rink": iconA,
"bar": iconA};
function setupMap()
{
map = new Map()
map.key = "ABQIAAAADp_YrEi7QJ6x0YMFueP0IRRvFMhu-aH-
r4xZb4hbtuR9T8ne0BRLXrDcZP639GiA3dXHqVnUZTxZsA";
map.setSize(new Point(800,800));
map.x = 0;
map.y = 0;
map.addEventListener(MapEvent.MAP_READY, onMapReady);
mapFrame.mapLoader.addChild(map);
}
setupMap();
function onMapReady(event:Event):void
{
var bRight:ControlPosition = new
ControlPosition(ControlPosition.ANCHOR_TOP_LEFT, 700, 100);
var zoomOpts:ZoomControlOptions=new ZoomControlOptions({
buttonSize: new Point(17, 17),buttonSpacing: new Point(0, 0),
hasScrollTrack: true, position:bRight });
var myZoomControl:ZoomControl = new ZoomControl(zoomOpts);
map.addControl(myZoomControl);
map.enableScrollWheelZoom();
//map.enableContinuousZoom();
map.setCenter(new LatLng(-34.565913, 150.80643), 10);
getXml();
//test for one marker
//var markerA:Marker = new Marker(new LatLng(-34.565913, 150.80643),
//new MarkerOptions({
//strokeStyle: new StrokeStyle({color: 0x987654}),
//fillStyle: new FillStyle({color: 0x223344, alpha: 0.8}),
// radius: 12,
// hasShadow: true,
// icon:new marker()
// })
// );
//map.addOverlay(markerA);
}
function getXml():void
{
var xmlString:URLRequest = new URLRequest("http://www.wird.com.au/
steelcity/skatemarkers.xml");
var xmlLoader:URLLoader = new URLLoader(xmlString);
xmlLoader.addEventListener("complete", readXml);
}
function readXml(event:Event):void
{
var markersXML:XML = new XML(event.target.data);
var markers:XMLList = markersXML..marker;
var markersCount:int = markers.length();
var i:Number;
for (i=0; i < markersCount; i++)
{
var markerXml:XML = markers[i];
var nameRink:String = markerXml. @ name;
var address:String = markerXml. @ address;
var type:String = markerXml. @ type;
var latlng:LatLng = new LatLng(markerXml. @ lat,markerXml. @
lng);
var infoB:Marker = createMarker(latlng,nameRink,address,type);
map.addOverlay(infoB);
//trace (nameRink);
}
}
function createMarker(latlng:LatLng, name:String, address:String,
type:String): Marker {
var marker:Marker = new Marker(latlng, new
MarkerOptions(
{icon: new
customIcons[type], iconOffset: new
Point(-0, -0),
strokeStyle: new StrokeStyle({color: 0x000000}),
fillStyle: new FillStyle({color: 0x223344, alpha: 0.8}),
radius: 15,
hasShadow: true}
));
var htmlOut:String = "<b>" + name + "</b>
<br/>" + address;
marker.addEventListener(MapMouseEvent.CLICK,
function(e:MapMouseEvent):void {
marker.openInfoWindow(new
InfoWindowOptions({contentHTML:htmlOut}));
});
trace(htmlOut);
return marker;
}
--
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.