Hello, in order to add properties to a polygon, extend the Polygon
class. For instance

public class MyPolygon extends Polygon {

public var myid:String;
public MyPolygon(id:String,points:Array,options:PolygonOptions=null) {
super(points,options);
myid = id;
}

}

you then call new MyPolygon(id,points,options) and add it to the map.
You can extend the class to have custom parameters you wants.

Jonathan
ScribbleMaps.com

On Sep 8, 1:33 am, kharddie <[email protected]> wrote:
> hi,
> am now changing my code from Umap to google map api for flash.
> My biggest problem is naming polygons or custom markers created
> dynamically.
> In Umap i was easy using Object eg assigning it properties like name,
> width, height, x,y etc
>
> var paramVIC:Object = new Object();
> paramVIC.points = new Array();
> paramVIC.name="tollevel";
> paramVIC.x=x;
> paramVIC.y=y;
> paramVIC.width=width;
> paramVIC.height=height;
> var polyVIC:Polygon=new Polygon(paramVIC,style_tria_blue);
>
> this way i could easily locate it with mouse events or have
> enter_frame events  on it eg
>
> polyVIC.addEventListener(Event.ENTER_FRAME,showInfoWindow,false, 0,
> true);
>
> my question is that can you have the name or id property on a polygon
> or custom marker if they are dynamically created?
>
> --arden

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