From d58d79facf316316848b79f6308aac3014fe4520 Mon Sep 17 00:00:00 2001
From: Emux <devemux86@gmail.com>
Date: Fri, 6 Jul 2018 14:12:27 +0300
Subject: [PATCH] ViewController API enhancements

---
 vtm/src/org/oscim/map/ViewController.java | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/vtm/src/org/oscim/map/ViewController.java b/vtm/src/org/oscim/map/ViewController.java
index d71622cd..257a3aea 100644
--- a/vtm/src/org/oscim/map/ViewController.java
+++ b/vtm/src/org/oscim/map/ViewController.java
@@ -29,7 +29,7 @@ import static org.oscim.utils.FastMath.clamp;
 
 public class ViewController extends Viewport {
 
-    protected float mPivotY = 0.0f;
+    private float mPivotY = 0.0f;
 
     private final float[] mat = new float[16];
 
@@ -71,6 +71,15 @@ public class ViewController extends Viewport {
         updateMatrices();
     }
 
+    /**
+     * Get pivot height relative to view center. E.g. 0.5 is usually preferred
+     * for navigation, moving the center to 25% of the view height.
+     * Range is [-1, 1].
+     */
+    public float getMapViewCenter() {
+        return mPivotY;
+    }
+
     /**
      * Set pivot height relative to view center. E.g. 0.5 is usually preferred
      * for navigation, moving the center to 25% of the view height.