Monday, December 22, 2008

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.

7 comments:

thunderhead said...

Some folks have been contacting me saying that the app has "issues" - looks like it has to do with FP9 - try running it in FP10 - sorry about this !

ldphelps said...

Have you done any work combining the Cluster App with the Flare App ?

Lance said...

It seems to work fine your site, but when I download the code and compile in Flex 1.3, it has an issue.

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?

Henry said...

Hi Lance,

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.

Unknown said...

Is this codes still available? I cannot seem to download it from your link. It looks like it would be a great option for us.

Thanks

Andy the Brit said...

me too....I can't download the code...

thunderhead said...

Sorry all for the broken link - find the new version here http://thunderheadxpler.blogspot.com/2010/08/image-flare-symbol-for-clustered.html