master
steffen 12 years ago
parent 87f0fac506
commit 52088304b9

@ -1,6 +1,9 @@
Version 0.0.2: name changed to spOSMroute, since on there had been another
OSMroute already.
=============================================================================
(2014-01-20):
- fixed: disabled screensaver on Android
(2013-08-28):
- fixed: some search messages created a crash on 32bit systems.

@ -30,6 +30,6 @@
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
</manifest>
<!-- END_INCLUDE(manifest) -->

@ -8,6 +8,8 @@ import android.os.Bundle;
import android.util.Log;
import android.content.Context;
import android.location.GpsStatus.NmeaListener;
import android.view.WindowManager;
import android.view.ViewGroup.LayoutParams;
public class spOSMrNActivity extends NativeActivity {
private static final String TAG = "spOSMroute Java";
@ -19,6 +21,7 @@ public class spOSMrNActivity extends NativeActivity {
private LocationListener mLocListener;
public void onCreate(Bundle savedInstanceState) {
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
mLocMan = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
mLocListener = new MyLocationListener();
mLocMan.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, mLocListener);
@ -76,6 +79,7 @@ public class spOSMrNActivity extends NativeActivity {
// Do some cleanup
@Override
public void onDestroy() {
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
super.onDestroy();
}
}

@ -58,7 +58,7 @@ void draw_mousemove (int x, int y, int btn) {
mousepos.y = y;
if (mousebtn) {
latold = -map_km2lat(((float)(mousebtnpresspos.y-gfx_screensize.y/2)) * view_scale);
lonold = map_km2lon(((float)(mousebtnpresspos.x-gfx_screensize.x/2)) * view_scale, view_lat + lat);
lonold = map_km2lon(((float)(mousebtnpresspos.x-gfx_screensize.x/2)) * view_scale, view_lat + latold);
lat = -map_km2lat(((float)(y-gfx_screensize.y/2)) * view_scale);
lon = map_km2lon(((float)(x-gfx_screensize.x/2)) * view_scale, view_lat + lat);

Loading…
Cancel
Save