예제 #1
0
 public async Task <Measurement> GetMeasurmentNearestAsync(double lat, double lng, double maxDistance = 3, IndexQueryType type = IndexQueryType.AirlyCAQI)
 {
     return(await Api.Request <Measurement>("measurements/nearest", "GET", new
     {
         lat,
         lng,
         maxDistanceKM = ParamsValidator.InfinityToDouble(maxDistance),
         indexType = ResolveIndexType(type)
     }));
 }
예제 #2
0
 public async Task <List <Installation> > GetInstallationsNearestAsync(double lat, double lng, double maxDistance = 3, int maxResults = 1)
 {
     return(await Api.Request <List <Installation> >("installations/nearest", "GET", new
     {
         lat,
         lng,
         maxDistanceKM = ParamsValidator.InfinityToDouble(maxDistance),
         maxResults
     }));
 }