Select to view content in your preferred language

Displacement of dinamic layers in zooming with new API 2.6

1077
6
12-21-2011 02:05 AM
PauPérez_Puigcerver
Emerging Contributor
Hello,

When I turn on a dinamic layer, with a tiled layer as a base layer (orthophoto or DTM), it moves diagonally respect of the base layer when I zoom in or zoom out. The problem dissapear when I pan with the dinamic layer turn on, and then I zoom in or zoom out without displacement. I tried with Chrome and Firefox and the problem is the same.

Does anyone know what happens?

Thanks

Pau Pérez
Conselleria de Infraestructuras, Territorio y Medio Ambiente
http://cma.gva.es
http://cartoweb.cma.gva.es
0 Kudos
6 Replies
JeffPace
MVP Alum
Is the problem only while zooming (i.e. the dynamic layer is in the correct place once the zoom is complete)?

Or is the problem after a zoom event the dynamic layer is in the wrong place.

v2.6 introduced some new zoom transitions, you can try disabling them.

http://help.arcgis.com/EN/webapi/javascript/arcgis/help/jsapi/map.htm

Look at the options, try:

navigationMode:'classic'
displayGraphicsOnPan: false
0 Kudos
PauPérez_Puigcerver
Emerging Contributor
Hello Jeff,

The problem is only when I zooming, but not always, displacement sometimes appears, sometimes not appears. When zoom ends, the layer is in correct place.

Thanks for the response.

Pau Pérez
Conselleria de Infraestructuras, Territorio y Medio Ambiente
http://cma.gva.es
http://cartoweb.cma.gva.es
0 Kudos
vipulsoni
Regular Contributor
Hello Jeff,

The problem is only when I zooming, but not always, displacement sometimes appears, sometimes not appears. When zoom ends, the layer is in correct place.

Thanks for the response.

Pau Pérez
Conselleria de Infraestructuras, Territorio y Medio Ambiente
http://cma.gva.es
http://cartoweb.cma.gva.es


Yes! this is issue is present in JS API and I have noted this too, when panning the map. After the pan operation completes the map pans but the layer gets shifted.
0 Kudos
EdSaunders
Regular Contributor
Hi there, this issue is happening in my app as well.  I'm using v2.6 and toggling dynamic layers using hide() and show() methods.  Steps I'm taking to test:

Toggle layer on
Wait for layer to display
Click to pan on the map or click zoom slider to zoom in or out
Layer shifts
Pan/zoom ends and the layer returns to correct location.

If I use v2.5 I don't get this issue.
0 Kudos
KellyHutchins
Esri Notable Contributor
The issue described below is a known issue at version 2.6 and should be fixed in the next release (2.7).  You can workaround this issue at 2.6 by setting the map's navigation mode to classic:

  map = new esri.Map("map",{
    extent:initExtent,
    navigationMode:'classic'
  });



Hi there, this issue is happening in my app as well.  I'm using v2.6 and toggling dynamic layers using hide() and show() methods.  Steps I'm taking to test:

Toggle layer on
Wait for layer to display
Click to pan on the map or click zoom slider to zoom in or out
Layer shifts
Pan/zoom ends and the layer returns to correct location.

If I use v2.5 I don't get this issue.
0 Kudos
EdSaunders
Regular Contributor
Thanks for the info Kelly, much appreciated.
0 Kudos