Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] Changing the display scale automatically per second

We have had real time tracking before; there is a tutorial which you can follow that uses sea gulls as a standing.

Here is the thing:
- use tiled map renderer (so that rendering into tiles is separate from panning
- use one of the special pan commands that animate to the new location
-- there are three pan tools available; try them out with tiled renderer on
-- one of them is "fixed scale" (so the tiles stay the same); and one is fixed scale and smooth which animates
-- you will need to look into the implementation to see how they do it

Using these techniques we have had "flicker free" pannning in udig; it currently crashes on the mac due to an SWT bug so we have not made it the default.

I also recommend writing your own (single) command that does what you want with a minimum number of redraws.
Jody

On 19/04/2010, at 6:53 PM, Kanupriya Chadha wrote:

Hi,
 
My application has an option where user can navigate to particular features. For this to work, we are using a thread which gets refreshed every second. While traversing to the feature, we have to change the display scale and shift the current position to the center of the map.
 
For zooming we are using the following code:
 
NavCommand[] commands = new NavCommand[] { 
            new SetViewportCenterCommand(currentPnt), 
            new ZoomCommand(1) }; 
StateVariables.context.sendASyncCommand(
            new NavComposite(Arrays.asList(commands)));
 
and for changing the display scale :
 
map.executeSyncWithoutUndo(new SetScaleCommand(5));
 
but these commands take around 5 secs to execute and hence the application fails to run.
 
Is there any way we can do it faster in about a sec?
 
Thank You
Kanupriya

 


Catch the changing security environment Get it now._______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel


Back to the top