Skip to main content

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

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.

Back to the top