mathisdt / trackworktime

Android app to track your work time via WiFi or location and categorize each recorded intervall by a predefined client/task and a free text.
https://zephyrsoft.org/trackworktime
GNU General Public License v3.0
136 stars 30 forks source link

select workplace using a map #225

Open mathisdt opened 1 year ago

mathisdt commented 1 year ago

Currently the user has to use either the menu item "Here = Work" or type in latitude and longitude of their workplace. At least the manual setting should be replaced by selecting a location on a map.

Here the german magazine c't described how it can be done using OSM (behind a paypall). In short, we could start with this:

GeoPoint point = new GeoPoint(
 52.3859132, 9.8089183); // heise
IMapController mapController =
 mapView.getController();
mapController.setCenter(point);
mapController.setZoom(12.0);
MyLocationNewOverlay myLocation =
 new MyLocationNewOverlay(
  new GpsMyLocationProvider(context),
  mapView);
mapView.getOverlays().add(myLocation);
Bitmap meBitmap = (
 (BitmapDrawable)getDrawable(
  R.drawable.me)).getBitmap();
myLocation.setPersonIcon(meBitmap);