Advertisement
Guest User

Untitled

a guest
Apr 26th, 2020
108
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. query.andWhere(`6371 * acos(
  2.     cos(radians(:latitude)) *
  3.     cos(radians(location.latitude)) *
  4.     cos(radians(location.longitude) - radians(:longitude)) +
  5.     sin(radians(:latitude)) *
  6.     sin(radians(location.latitude))
  7. ) <= :radiusInKilometers`, {
  8.     latitude,
  9.     longitude,
  10.     radiusInKilometers,
  11. });
Advertisement
RAW Paste Data Copied
Advertisement