@@ -402,13 +402,16 @@ public float getCurrentRotateDegrees()
402
402
return this .currentRotateDegrees ;
403
403
}
404
404
405
- public void setCurrentRotationDegrees (float degrees )
405
+ public void setCurrentRotationDegrees (float degrees , float pivotX , float pivotY )
406
406
{
407
- this .matrix .postRotate (-currentRotateDegrees + degrees );
408
- this .rotateDegrees = this .currentRotateDegrees = degrees ;
409
- setCurrentRotateDegreesWithRule ();
410
- refresh ();
411
- mapCenter (true , true );
407
+ if (isRotationGestureEnabled )
408
+ {
409
+ this .matrix .postRotate (-currentRotateDegrees + degrees , pivotX , pivotY );
410
+ this .rotateDegrees = this .currentRotateDegrees = degrees ;
411
+ setCurrentRotateDegreesWithRule ();
412
+ refresh ();
413
+ mapCenter (true , true );
414
+ }
412
415
}
413
416
414
417
public float getCurrentZoomValue ()
@@ -453,41 +456,6 @@ public void setMinZoomValue(float minZoomValue)
453
456
this .minZoomValue = minZoomValue ;
454
457
}
455
458
456
- public void zoomBy (float zoomRatio , float pivotX , float pivotY )
457
- {
458
- float zoom = getCurrentZoomValue ();
459
- float zoomdis = zoomRatio ;
460
- if (zoomRatio > 1 )
461
- {
462
- if (zoomRatio * zoom > maxZoomValue )
463
- {
464
- zoomdis = maxZoomValue / zoom ;
465
- zoom = maxZoomValue ;
466
- }
467
- else
468
- {
469
- zoom *= zoomRatio ;
470
- zoomdis = zoomRatio ;
471
- }
472
- }
473
- else if (zoomRatio < 1 )
474
- {
475
- if (zoom * zoomRatio < minZoomValue )
476
- {
477
- zoomdis = minZoomValue / zoom ;
478
- zoom = minZoomValue ;
479
- }
480
- else
481
- {
482
- zoom *= zoomRatio ;
483
- zoomdis = zoomRatio ;
484
- }
485
- }
486
- this .zoom = this .currentZoom = zoom ;
487
- this .matrix .postScale (zoomdis , zoomdis , pivotX , pivotY );
488
- this .refresh ();
489
- }
490
-
491
459
492
460
public float [] getMapCoordinateWithScreenCoordinate (float x , float y )
493
461
{
0 commit comments