Changeset View
Changeset View
Standalone View
Standalone View
src/it/reyboz/bustorino/ActivityMap.java
Show First 20 Lines • Show All 81 Lines • ▼ Show 20 Lines | public class ActivityMap extends GeneralActivity { | ||||
private MapView map = null; | private MapView map = null; | ||||
public Context ctx; | public Context ctx; | ||||
private MyLocationNewOverlay mLocationOverlay = null; | private MyLocationNewOverlay mLocationOverlay = null; | ||||
private FolderOverlay stopsFolderOverlay = null; | private FolderOverlay stopsFolderOverlay = null; | ||||
protected ImageButton btCenterMap; | protected ImageButton btCenterMap; | ||||
protected ImageButton btFollowMe; | protected ImageButton btFollowMe; | ||||
@RequiresApi(api = Build.VERSION_CODES.HONEYCOMB) | //@RequiresApi(api = Build.VERSION_CODES.HONEYCOMB) | ||||
@Override | @Override | ||||
public void onCreate(Bundle savedInstanceState) { | public void onCreate(Bundle savedInstanceState) { | ||||
super.onCreate(savedInstanceState); | super.onCreate(savedInstanceState); | ||||
//handle permissions first, before map is created. not depicted here | //handle permissions first, before map is created. not depicted here | ||||
//load/initialize the osmdroid configuration | //load/initialize the osmdroid configuration | ||||
▲ Show 20 Lines • Show All 323 Lines • ▼ Show 20 Lines | public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { | ||||
setOption(LOCATION_PERMISSION_GIVEN, false); | setOption(LOCATION_PERMISSION_GIVEN, false); | ||||
} | } | ||||
break; | break; | ||||
//add other cases for permissions | //add other cases for permissions | ||||
} | } | ||||
} | } | ||||
} | } | ||||
No newline at end of file | No newline at end of file |
Public contents are in Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) or GNU Free Documentation License (at your option) unless otherwise noted. · Contact / Register