title: Strapi API: Set custom query service to find nearest location within a range?
body: <p>By sending latitude longitude of current Location, I would like to find the nearest airport in my collection.</p>
  
  <p>I've used <a href="https://github.com/cmoncrief/geodist" rel="nofollow noreferrer">geodist</a> for finding the distance between two latitute/longitude coordinates.</p>
  
  <p><strong>Question:</strong> Is it possible to make a query after getting all collection of airport to check whether the current location is available within a specific distance?</p>
  
  <p><strong>E.g.</strong> When minimum current distance to an item of the collections is within 100km, then I would like to show this item as result.</p>
  
  <p>This My Query...</p>
  
  <pre><code>return Airport
      .find(_.pick(params, _.keys(Airport.schema.paths)))
      .populate(_.keys(_.groupBy(_.reject(
          strapi.models.airport.associations, {autoPopulate: false}), 'alias')).join(' '));
  </code></pre>
  
  <p>This My Route...</p>
  
  <pre><code>{
      "method": "GET",
      "path": "/airport/:latitude/:longitude/",
      "handler": "Airport.findOne",
      "config": {
          "policies": []
       }
  },
  </code></pre>
  
  <p>This my Controller...</p>
  
  <pre><code>findOne: async (ctx) =&gt; {
      return strapi.services.airport.fetch(ctx.params);
  },
  </code></pre>