After upgrading to 10.2.2, we are facing some issues that are related to the new animations introduced in the zoomTo and setExtent methods1. Issues related to showing calloutsmap.zoomToScale(somePoint, map.getMaxScale());
map.getCallout().show((Point)somePoint.getGeometry());
Use case: To show the location of a place on the map with the place name on the calloutWhen these statements are called together, as the map zooms and pans to the point, the callout that is shown, moves along with the map and stops at another random point when the animation ends. When the user pans the map again, the callout magically snaps back to the intended point.If these statements are reversed,map.getCallout().show((Point)somePoint.getGeometry());
map.zoomToScale(somePoint, map.getMaxScale());
then sometimes, the callout is hidden while the map zooms and pans to the selected point and once the animation has stopped, the callout appears at the intended point.This is the expected behaviour. But occasionally the callout shows on the map as the animation starts and moves along the map as the map pans to the point.Now we are using the workaround given below.
map.zoomToScale(somePoint, map.getMaxScale());
new Handler().postDelayed(new Runnable() {
public void run() {
map.getCallout().show(point);
}
}, 1500);
1500 because I noticed the zoomTo animation duration is less than 1500milliseconds.2. Issues related to setting rotation angle and extent.map.setExtent(someFixedExtent);
map.setRotationAngle(0);
Use case: To reset the extent and rotationangle.If these statements are called together and the map rotation angle was greater than 0, the map does not set the correct extent.The workaround:
if (map.getRotationAngle() == 0)
map.setExtent(someFixedExtent);
else {
map.setRotationAngle(0);
new Handler().postDelayed(new Runnable() {
public void run() {
map.setExtent(someFixedExtent);
}
}, 1500;
}
Any help is appreciated