org.osmdroid.util
Class NetworkLocationIgnorer

java.lang.Object
  extended by org.osmdroid.util.NetworkLocationIgnorer
All Implemented Interfaces:
UtilConstants

public class NetworkLocationIgnorer
extends Object
implements UtilConstants

A class to check whether we want to use a location. If there are multiple location providers, i.e. network and GPS, then you want to ignore network locations shortly after a GPS location because you will get another GPS location soon.

Author:
Neil Boyd

Field Summary
 
Fields inherited from interface org.osmdroid.util.constants.UtilConstants
GPS_WAIT_TIME
 
Constructor Summary
NetworkLocationIgnorer()
           
 
Method Summary
 boolean shouldIgnore(String pProvider, long pTime)
          Whether we should ignore this location.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetworkLocationIgnorer

public NetworkLocationIgnorer()
Method Detail

shouldIgnore

public boolean shouldIgnore(String pProvider,
                            long pTime)
Whether we should ignore this location.

Parameters:
pProvider - the provider that provided the location
pTime - the time of the location
Returns:
true if we should ignore this location, false if not


Copyright © 2012. All Rights Reserved.