Thursday, August 28, 2008

Flock on

One of the common things we are asked is "how to make dots move on a map". Graham Davis has been nice enough to put together a little demo.

Click on the above image to open the Flock Demo

The source code for this demo can be found on trunk here:
- net.refractions.udig.tutorials.tracking

The rough idea is as follows:
  1. Place your "Domain Model" on the map blackboard; complete its own events and all the stuff you would normally do.
  2. Create a "Map Graphic" that checks the map blackboard - if it finds the domain model objects it can draw them; and listen to them if they are the kind of thing that moves around.
  3. If you needed to make any custom tools you could also check the map blackboard and poke away at your domain model objects directly

No comments: