dat-ng / ar-location-based-android

This AR app generally show where things are in the real-world by indicating where the app thinks they are over the camera view when the user holds the phone up and moves it about.
MIT License
203 stars 85 forks source link

How to show points according to radius. #16

Open ShantiRanjanDas opened 6 years ago

ShantiRanjanDas commented 6 years ago

Currently you have no preference on radius. How to add radius according to which locations are visible. Like within 10 km or 40 km,etc

makisp commented 6 years ago

If you have two locations you can use something likeurLocation.distanceTo(pointLocation) which returns an approximate distance in meters. You can then show only the points that are closer than the distance you want.