function listFeatures(call) {
  var lo = call.request.lo;
  var hi = call.request.hi;
  var left = _.min([lo.longitude, hi.longitude]);
  var right = _.max([lo.longitude, hi.longitude]);
  var top = _.max([lo.latitude, hi.latitude]);
  var bottom = _.min([lo.latitude, hi.latitude]);
  // For each feature, check if it is in the given bounding box
  _.each(feature_list, function(feature) {
    if (feature.name === '') {
      return;
    }
    if (feature.location.longitude >= left &&
        feature.location.longitude <= right &&
        feature.location.latitude >= bottom &&
        feature.location.latitude <= top) {
      call.write(feature);
    }
  });
  call.end();
}
function listFeatures(call) {
  var lo = call.request.lo;
  var hi = call.request.hi;
  var left = _.min([lo.longitude, hi.longitude]);
  var right = _.max([lo.longitude, hi.longitude]);
  var top = _.max([lo.latitude, hi.latitude]);
  var bottom = _.min([lo.latitude, hi.latitude]);
  // For each feature, check if it is in the given bounding box
  _.each(feature_list, function(feature) {
    if (feature.name === '') {
      return;
    }
    if (feature.location.longitude >= left &&
        feature.location.longitude <= right &&
        feature.location.latitude >= bottom &&
        feature.location.latitude <= top) {
      call.write(feature);
    }
  });
  call.end();
}
function listFeatures ( call ) { var lo = call . request . lo ; var hi = call . request . hi ; var left = _ . min ( [ lo . longitude , hi . longitude ] ) ; var right = _ . max ( [ lo . longitude , hi . longitude ] ) ; var top = _ . max ( [ lo . latitude , hi . latitude ] ) ; var bottom = _ . min ( [ lo . latitude , hi . latitude ] ) ; // For each feature, check if it is in the given bounding box _ . each ( feature_list , function ( feature ) { if ( feature . name === '' ) { return ; } if ( feature . location . longitude >= left && feature . location . longitude <= right && feature . location . latitude >= bottom && feature . location . latitude <= top ) { call . write ( feature ) ; } } ) ; call . end ( ) ; }
listFeatures request handler. Gets a request with two points, and responds
with a stream of all features in the bounding box defined by those points.
@param {Writable} call Writable stream for responses with an additional
request property for the request value.
listFeatures request handler . Gets a request with two points and responds with a stream of all features in the bounding box defined by those points .
List features in a given region