Hi Seis- Looks like you're passing color as a string instead of a number. Try fixing that and see what happens.
- pamela On Fri, Jun 12, 2009 at 3:32 PM, Seis Pesos<[email protected]> wrote: > > I'm trying like this; > > // .....un.dos.tres..... > import mx.collections.ArrayCollection; > public var polygons:Array = [ > {latlng: [new LatLng(35.7, 140.8), ..... new LatLng(35.7, 140.8)], > label: "AAA", color: "0x008000"}, > {latlng: [new LatLng(35.8, 138.9), ..... new LatLng(35.8, 138.9)], > label: "BBB", color: "0xFF0000"}, > {latlng: [new LatLng(35.5, 139.7), ..... new LatLng(35.5, 139.7)], > label: "CCC", color: "0x0000FF"} > ]; > // .....brabrabra..... > private function onMapReady(event:Event):void { > map.setCenter(new LatLng(36.0, 137.0), 6); > for (var i:int = 0; i < polygons.length; i++) { > var currentPolygon:Object = polygons[i]; > createPolygon(currentPolygon); > } > } > // .....jojojojo..... > public function createPolygon(currentPolygon:Object):void { > var label: String = currentPolygon.label; > var colorado: String = currentPolygon.color; > var cadapolygon:Polygon = new Polygon(currentPolygon.latlng, new > PolygonOptions({ > strokeStyle: new StrokeStyle({ color: 0x333333, thickness: 1, > alpha: 0.1}), > fillStyle: new FillStyle({ color: colorado, alpha: 0.5}) > })); > cadapolygon.addEventListener(MapMouseEvent.CLICK, function > (event:MapMouseEvent):void { > map.openInfoWindow(event.latLng, new InfoWindowOptions > ({title:label, width:100})); > }); > map.addOverlay(cadapolygon); > } > // .....plop!!..... > > As a result, these are same color (0x0000FF). What I do wrong? > I appreciate any advice. > > Seis Pesos, Yokohama JP > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
