¡@

Home 

2014/10/16 ¤W¤È 08:10:59

android Programming Glossary: calculatederivedposition

Android - SQlite Getting nearest locations (with latitude and longitude)

http://stackoverflow.com/questions/3695224/android-sqlite-getting-nearest-locations-with-latitude-and-longitude

than and more than sqlite operators to determine if your points in database are in that rectangle or not. The method calculateDerivedPosition ... calculates those points for you p1 p2 p3 p4 in picture . Calculates the end point from a given source at a given range.. bearing Bearing in degrees @return End point from the source given the desired range and bearing. public static PointF calculateDerivedPosition PointF point double range double bearing double EarthRadius 6371000 m double latA Math.toRadians point.x double lonA Math.toRadians.. And now create your query PointF center new PointF x y final double mult 1 mult 1.1 is more reliable PointF p1 calculateDerivedPosition center mult radius 0 PointF p2 calculateDerivedPosition center mult radius 90 PointF p3 calculateDerivedPosition center..