JC Flash Map Markers
Overview | Properties | Methods | Events | Markers
The Marker class
The markers are pins displayed on the map, associated to specific locations on the map. A marker is represented by an object of type Marker and has the following properties and methods:Properties
- id:String - the id of the marker. Must be set by you and there cannot be two markers with the same id.
- lat:Number - the latitude coordinate of the marker.
- lng:Number - the longitude coordinate of the marker.
- point:LatLng - an object of type LatLng which contains the coordinates in latitude and longitude of the marker.
- details:String - details or a short description of the location represented by the marker.
- icon:String - the icon clip for the marker. Can be specified by a class name or the URL of an image.
- iconAnchorX:int - the x coordinate for the anchor of the icon, inside the marker;
- iconAnchorY:int - the y coordinate for the anchor of the icon, inside the marker;
Methods
- Marker() - constructor for the marker object;
- equals(other:Object):Boolean - verifies if the current marker is equal to another marker object passed as argument;
- toString():String - returns the Marker object in String format with its id and point.
The MarkerColl class
A MarkerColl object is actually a list of Marker object that can only be accessed and managed through methods and not properties:Properties
- length:int - the length of the markers list
- map:JC Flash Map - the reference to the map component instance
Methods
- MarkerColl() - constructor
- selectItem(item:Marker, force:Boolean = false):void - selects the marker passed as argument. If the marker is not visible on the map, it will center the marker on the map is force is set to true;
- addItem(item:Marker):Boolean - adds a new Marker object to the list of markers and displays it on the map;
- getItemAt(index:int):Object - returns the marker from the list that has the specified index;
- findItem(id:String):Marker - returns the marker from the list that has the id specified as argument;
- removeItem(item:Marker):Boolean - removes the specified marker from the list and the map and returns true if the removal was successful;
- removeAllItems():void - removes all the items from the list;
- updateMarkers():void - updates the markers visually (adds or removes them from the display).
Overview | Properties | Methods | Events | Markers
The free version contains watermark and can be used for trial purposes only.
Watermarked