RUNO Active Member Licensed User Longtime User Apr 20, 2020 #1 My app for delivery. Can I create an area dependent on longitude and latitude and save it in a database and check the customer's location inside or outside region.
My app for delivery. Can I create an area dependent on longitude and latitude and save it in a database and check the customer's location inside or outside region.
drgottjr Expert Licensed User Longtime User Apr 20, 2020 #2 yes. hard to say what you might already know or not know how to do... gps, fused location, sqlite, geofence. search them here. geofence is the key element in this case. Upvote 0
yes. hard to say what you might already know or not know how to do... gps, fused location, sqlite, geofence. search them here. geofence is the key element in this case.
RUNO Active Member Licensed User Longtime User Apr 21, 2020 #3 drgottjr said: yes. hard to say what you might already know or not know how to do... gps, fused location, sqlite, geofence. search them here. geofence is the key element in this case. Click to expand... What result I get? I changed the center point and radius, I want to check the location inside the circle or not, how? I want a result. Upvote 0
drgottjr said: yes. hard to say what you might already know or not know how to do... gps, fused location, sqlite, geofence. search them here. geofence is the key element in this case. Click to expand... What result I get? I changed the center point and radius, I want to check the location inside the circle or not, how? I want a result.
klaus Expert Licensed User Longtime User Apr 21, 2020 #4 You can use: B4X: Copy Distance = CenterLocation.DistanceTo(LocationToCheck) If Distance <= Radius Then ' insides Else ' outsides End If You know the location of your center and you know the locations to check, so can calculate the distance between those with DistanceTo method of the Location object in the GPS library. Upvote 0
You can use: B4X: Copy Distance = CenterLocation.DistanceTo(LocationToCheck) If Distance <= Radius Then ' insides Else ' outsides End If You know the location of your center and you know the locations to check, so can calculate the distance between those with DistanceTo method of the Location object in the GPS library.