ims.map
Class MyLocationListener
java.lang.Object
ims.map.MyLocationListener
- All Implemented Interfaces:
- com.google.android.gms.location.LocationListener
public class MyLocationListener
- extends java.lang.Object
- implements com.google.android.gms.location.LocationListener
Runnable which handles location changes of my location (phone's location).
Copyright © 2014 by Daniela Blum
This file is part of GPSChildFinder.
GPSChildFinder is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
this program. If not, see http://www.gnu.org/licenses.
- Author:
- Daniela Blum
Method Summary |
com.google.android.gms.location.LocationRequest |
getMyLocationRequest()
|
void |
onLocationChanged(android.location.Location myLocation)
Called when my location (phone's location) has changed. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UPDATE_INTERVAL_IN_SECONDS
public static final int UPDATE_INTERVAL_IN_SECONDS
- See Also:
- Constant Field Values
MyLocationListener
public MyLocationListener(Map map)
- Constructor.
- Parameters:
map
- Map class in which the main components of the map and the
Map.myLocationClient
is located.
onLocationChanged
public void onLocationChanged(android.location.Location myLocation)
- Called when my location (phone's location) has changed.
First - is the location access still allowed by the user? Stores the new
GPS coordinates to Map.myLocationLatLng
and asks for the
declination for the compass mode.
At the end the location is shown on the map and set to the point of
interest if Map.myLocationButton
is selected.
- Specified by:
onLocationChanged
in interface com.google.android.gms.location.LocationListener
getMyLocationRequest
public com.google.android.gms.location.LocationRequest getMyLocationRequest()