https://github.com/jitinsharma/offlineairportapi
Android library to get nearest Airport from latitude/longitude without webservice call
https://github.com/jitinsharma/offlineairportapi
airline airport android sdk-android
Last synced: 4 months ago
JSON representation
Android library to get nearest Airport from latitude/longitude without webservice call
- Host: GitHub
- URL: https://github.com/jitinsharma/offlineairportapi
- Owner: jitinsharma
- Created: 2017-05-13T19:34:31.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-05-13T19:38:31.000Z (over 8 years ago)
- Last Synced: 2025-06-27T10:05:57.678Z (4 months ago)
- Topics: airline, airport, android, sdk-android
- Language: Java
- Size: 2.8 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Offline Airport API
A simple Android Library to get Nearest Airport(s) from latitude,longitude using a local json data
(~28K airports).Local data is sourced from [here.](https://github.com/mwgg/Airports)
## Why(s) and Good(s)
- Ability to get nearest airport without a webservice call.
- Can be used as a cache mechanism in case webservice call takes longer time.
- Can be used as a fallback mechanism if webservice fails.(Server error, user is not connected to
internet)## Bad(s)
- Although data set is exhaustive, it's not an updated one.
- Library size (~ 1.6 MB)## Usage
Create a RequestAirportRequest airportRequest = new AirportRequest();
airportRequest.setLatitude("28.632907");
airportRequest.setLongitude("77.219536");Initialize library
OfflineAirportApi offlineAirportApi = new OfflineAirportApi(this);
Get Single Nearest Airport
//Must be called asynchronously
AirportResponse airportResponse = offlineAirportApi.getNearestAirport(airportRequest);Get Multiple Nearest Airports
//Set a minimum distance limit from current location. Has a default value of 50,000m
offlineAirportApi.setDistanceLimit(25000);
//Must be called asynchronously
ArrayList airportResponses = offlineAirportApi.getNearestAirports(airportRequest);**Check Sample App for Usage.**
## TODO
- Check for more sources of data.
- Handle calculation asynchronously within the library.
- Ability to detect location using GPS from library.  