Never did get a reply to this.
My final solution was to make the parts of Degrafa that I needed work in Flex 4. It seems that the "Graphics" UIComponent sometimes goes nuts if you have too many of them (as in, if I put 400-500 congressional districts on the map, only about a sixth actually appear, and it dies of slowness, and clicking doesn't work properly in any way at all, and in a simple US map a couple of states go missing). A bunch of Paths will draw themselves fine, but since it's not a real component (it just draws itself in whatever its parent is I think), you can't interact with a specific path, just the thing it has been drawn on. So that's not really workable for what I'm trying to do. I could just be doing it all wrong, but it was easier to just fix some Degrafa stuff. I also noticed that the QuietlyScheming Landscape Zoomer doesn't appear to work in Flex 4. Rather than figure that out, I tried to create an approximation. Thought I'd share it: http://charlieszymanski.com/flex/Landscape.txt Hope it helps someone out. CS --- In [email protected], "charlie.szymanski" <char...@...> wrote: > > Okay, rather than try to explain this crazily, here's a visual example of > something I've done: > > http://www.nationaljournal.com/njonline/hc_20100322_8844.php > > The graphic loads an SVG file and parses it into Degrafa GeometryGroups (I > basically followed their map example here: > http://www.degrafa.org/source/DegrafaMapSample/DegrafaMapDemo.html, but made > an empty "Geography" class so I could fill it with path and other data and > get it out later). It pushes each GeomtryGroup into a Surface. The Surface > listens for a click event, and finds out what GeometryGroup was clicked on > using the event.target. The whole thing is wrapped in QuietlyScheming's > Landscape component so it can zoom in on the clicked GeometryGroup. > > Trying to port this to Flex 4 / FXG has proven difficult. The only way I can > get the SVG to display correctly is to turn my GeometryGroups into Paths > (making them Graphics causes layout chaos) and shove them into a single > Graphic instance. The problem is that the Paths don't dispatch any events > (can't listen for a click, rollover, anything). And as far as I know, there's > no way to figure out which Path was clicked on if you're listening to the > Graphic instance. > > Am I missing something obvious? Does anyone have an idea how I should be > thinking about porting this over? Am I doing it wrong entirely? I haven't > spent too long on it, but it's proven to be frustrating (Would I be better > off fiddling with the Degrafa source to get it to compile under Flex 4?) > > Any suggestions welcome. > > Charlie >

