From 4b18c323b69e6853ee08a972c7a5adcb1be2bc11 Mon Sep 17 00:00:00 2001 From: sjtufs Date: Wed, 28 Aug 2013 18:11:29 +0800 Subject: fixed #18 --- client/Piztor/src/com/macaroon/piztor/MapMaker.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/Piztor/src/com/macaroon/piztor/MapMaker.java b/client/Piztor/src/com/macaroon/piztor/MapMaker.java index 533cfcb..895d409 100644 --- a/client/Piztor/src/com/macaroon/piztor/MapMaker.java +++ b/client/Piztor/src/com/macaroon/piztor/MapMaker.java @@ -61,6 +61,8 @@ public class MapMaker extends Activity{ private LocationOverlay mLocationOverlay; private Context context; private MKMapTouchListener mapTouchListener; + boolean isFirstLoc = true; + /** * popups */ @@ -119,9 +121,10 @@ public class MapMaker extends Activity{ */ mLocationOverlay.setData(locationData); mMapView.refresh(); - if (hasAnimation) { + if (hasAnimation || isFirstLoc) { mMapController.animateTo(new GeoPoint((int)(locationData.latitude * 1E6), (int)(locationData.longitude * 1E6))); } + isFirstLoc = true; } public void InitMap() { -- cgit v1.2.3-70-g09d2