This page last changed on Apr 13, 2005 by jgarnett.
NavigationCommandFactory factory = NavigationCommandFactory.getInstance();

NavCommand[] commands = new NavCommand[] {
   factory.createSetViewportCenterCommand(m.pixelToWorld( r.x + r.width / 2, r.y + r.height / 2)),
   factory.createZoomCommand(r.width / getContext().getMapDisplay().getDisplaySize().getWidth()) };

   map.sendCommand(factory.createCompositeCommand(commands));
Document generated by Confluence on Nov 19, 2005 20:03