Flaring Clustered Map Points
Following the last post, It would be nice to inspect the clustered set of map points when say the set is less than a dozen or so. In this post, I'm demonstrating something I call a FlareSymbol, which is a Symbol sub-class, where like before, the number of clustered points is shown. But, when you click on the cluster, it flares out to show the individual map points. Each flared point can react to say a mouse click to popup an info window showing its attribute values. When you click again on the cluster, it collapses the map points back to its center. Here it is in action. And like usual, you can download the source from here.
Comments
It will run, but after I expand a point, then contract it, and click on it again, I get an error: RangeError: Error #2006: The supplied index is out of bounds.
at flash.display::DisplayObjectContainer/addChildAt()
at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::$addChildAt()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:5083]...
Any ideas?
To fix the Error#2006 problem:
In "flareIn_tweenEndHandler", replace the line "graphic.parent.removeChild( graphic )" with "GraphicsLayer(graphic.parent).remove(graphic)"
That is, use the method 'remove' rather than 'removeChild'.
HTH.
Thanks