text: // This snippet file was generated by processing the source file:
  // ./firestore-next/test.solution-geoqueries.js
  //
  // To make edits to the snippets in this file, please edit the source
  
  // [START fs_geo_add_hash_modular]
  import { doc, updateDoc } from 'firebase/firestore';
  
  // Compute the GeoHash for a lat/lng point
  const lat = 51.5074;
  const lng = 0.1278;
  const hash = geofire.geohashForLocation([lat, lng]);
  
  // Add the hash and the lat/lng to the document. We will use the hash
  // for queries and the lat/lng for distance comparisons.
  const londonRef = doc(db, 'cities', 'LON');
  await updateDoc(londonRef, {
    geohash: hash,
    lat: lat,
    lng: lng
  });
  // [END fs_geo_add_hash_modular]