From 885d5a6078616aece0b12c521661c325b295ce6c Mon Sep 17 00:00:00 2001 From: sjtufs Date: Wed, 28 Aug 2013 18:04:06 +0800 Subject: fixed #18 --- client/Piztor/src/com/macaroon/piztor/Main.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'client') diff --git a/client/Piztor/src/com/macaroon/piztor/Main.java b/client/Piztor/src/com/macaroon/piztor/Main.java index 952b7f2..5aa767d 100644 --- a/client/Piztor/src/com/macaroon/piztor/Main.java +++ b/client/Piztor/src/com/macaroon/piztor/Main.java @@ -236,7 +236,9 @@ public class Main extends PiztorAct { requesLocation(Infomation.myInfo.gid); break; case FocuseButtonPress: - mapMaker.UpdateLocationOverlay(locData, true); + if( locData != null) { + mapMaker.UpdateLocationOverlay(locData, true); + } else mapMaker.InitMap(); break; case SuccessFetch: flushMap(); @@ -299,6 +301,8 @@ public class Main extends PiztorAct { mapMaker.InitMap(); mLocClient = new LocationClient(this); locData = new LocationData(); + locData.latitude = 31.032247; + locData.longitude = 121.445937; mLocClient.registerLocationListener(myListener); LocationClientOption option = new LocationClientOption(); option.setOpenGps(true); -- cgit v1.2.3-70-g09d2