Pawneshwer Gupta
Pawneshwer Gupta

Reputation: 2342

I want to filter location (LatLng)

I have List<LatLng> having locations (morethan 2000 locations). each location have distance of 100 meters. but list is too big so i want to filter some locations based on location priority (like top visited location, famous location, entity name, city name or something else)

Actually i'm saving user's current location to our server when they move 100 metres, and now i want to display complete path on Google map, its working fine, but app may got freeze if there are too large list of location, so i want to pick best locations from it so i can prevent my app from freezing.

Upvotes: 1

Views: 202

Answers (1)

Hanzala
Hanzala

Reputation: 1983

What you need is to translate the distance into degrees of longitude and latitude, filter based on those to bound the entries that are roughly in the bounding box, then do a more precise distance filter. Here is great paper that explains how to do all this

copied form original post here

Upvotes: 1

Related Questions