{"id":15454665,"url":"https://github.com/usmansbk/react-native-geodb","last_synced_at":"2025-04-21T09:20:13.119Z","repository":{"id":111535277,"uuid":"214750327","full_name":"usmansbk/react-native-geodb","owner":"usmansbk","description":"A simple and fully customizable GeoDB cities api component for iOS and Android React-Native apps","archived":false,"fork":false,"pushed_at":"2020-04-26T15:02:51.000Z","size":554,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-18T05:14:18.315Z","etag":null,"topics":["android","cities","geodb","ios","location","places","places-autocomplete","react","react-native","search"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/react-native-geodb","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/usmansbk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-13T02:45:18.000Z","updated_at":"2022-03-29T14:48:41.000Z","dependencies_parsed_at":"2023-05-01T11:32:44.948Z","dependency_job_id":null,"html_url":"https://github.com/usmansbk/react-native-geodb","commit_stats":{"total_commits":44,"total_committers":1,"mean_commits":44.0,"dds":0.0,"last_synced_commit":"8c057d0065a474691198a793c5ab2b27aff45a27"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usmansbk%2Freact-native-geodb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usmansbk%2Freact-native-geodb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usmansbk%2Freact-native-geodb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usmansbk%2Freact-native-geodb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/usmansbk","download_url":"https://codeload.github.com/usmansbk/react-native-geodb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249686178,"owners_count":21310775,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","cities","geodb","ios","location","places","places-autocomplete","react","react-native","search"],"created_at":"2024-10-01T22:04:43.924Z","updated_at":"2025-04-20T00:54:28.266Z","avatar_url":"https://github.com/usmansbk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-geodb\nA simple and fully customizable GeoDB cities api component for iOS and Android React-Native apps\n\n### Preview\n\u003cimg width=\"200\" alt=\"Screenshot_2019-10-13-02-46-32-488_com examples\" src=\"https://user-images.githubusercontent.com/10219539/66710663-0a396180-ed75-11e9-94c1-d95ebb0e32eb.png\"\u003e \u003cimg width=\"200\" alt=\"Screenshot_2019-10-13-02-46-43-816_com examples\" src=\"https://user-images.githubusercontent.com/10219539/66710675-36ed7900-ed75-11e9-975f-7b4a57567e00.png\"\u003e \u003cimg width=\"200\" alt=\"Screenshot_2019-10-13-00-43-13-468_com schdlr\" src=\"https://user-images.githubusercontent.com/10219539/66710692-80d65f00-ed75-11e9-8151-822e9261a48d.png\"\u003e\n\n\n\n### Installation\n\n1. ```npm install react-native-geodb --save``` or ```yarn add react-native-geodb```\n2. Get your [GeoDB Cities API key](http://geodb-cities-api.wirefreethought.com/) and [subscribe](https://rapidapi.com/wirefreethought/api/GeoDB%20Cities/pricing) to the free basic plan.\n\n\u003e ...Or Use the Free Instance (without passing any API KEY)\n\u003e The free instance allows up to 432,000 requests/day. However, it has significantly less cities (only cities with populations of greater than 20,0000).\n\n### Example\n```jsx\nimport GeoDBCitiesSearch from 'react-native-geodb';\n\n\u003cGeoDBCitiesSearch\n  debounce={200}\n  placeholder=\"Search cities\"\n  placeholderTextColor=\"#f5f5f5\"\n  onSelectItem={(data) =\u003e console.log(data.city)}\n  emptyListImagePlaceholder={require('../../../assets/emptyList.png')}\n  query={{\n    key: GEODB_API_KEY,\n    api: 'geo',\n    types: 'cities'\n  }}\n  params={{\n    language: 'en',\n    limit: 10,\n    offset: 0\n  }}\n  renderLeftButton={() =\u003e \u003cCustomIconButton onPress={...}\u003e}\n  renderItem={({ item }) =\u003e \u003cCustomSearchItem /\u003e}\n  ListEmptyComponent={({ metadata, styles, source }) =\u003e \u003cCustomEmptyList /\u003e}\n  styles={{...}}\n/\u003e\n```\n### Props\n\n| Prop | type | default |\n| ---- | ---- | ------- |\n| styles | object (StyleSheet) | {...} |\n| debounce | number | 200 |\n| minLength | number | 2 |\n| query | object (Query) | {...} |\n| params | object (Params) | key/value of GeoDB search url params |\n| onSelectItem | function | not used if renderItem is defined |\n| onError | function | console.log |\n| onResponse | function | console.log |\n| hideTextInput | boolean | false |\n| hidePoweredBy | boolean | false |\n| showActivityIndicator | boolean | false |\n| colors | array | []\n\n## Query\n| Key | Type | default |\n| --- | ---- | ------- |\n| api | string | \"geo\" |\n| key | string | YOUR_API_KEY |\n| version | string | \"v1\" |\n| types | string | \"cities\" |\n\n## Params\nCheckout GeoDB guides for a complete list\n\n| Key | Type | default |\n| ---- | ---- | ------- |\n| limit | number | 10 |\n| languageCode | string | \"en\" |\n| location | string | \"lat,lon\" |\n\n\n### Styling\n\n```GeoDBCitiesSearch``` can be easily customized to meet styles of your  app. Pass styles props to ```GeoDBCitiesSearch``` with style object for different elements (keys for style object are listed below)\n\n| key | type |\n| ---- | ---- |\n| contentContainer | object (View) |\n| textInputContainer | object (View style) |\n| textInput | object (style) |\n| itemContainer | object (Veiw style) |\n| itemContent | object (View style) |\n| itemText | object (Text style) |\n| emptyList | object (View style) |\n| poweredContainer | object (View style) |\n| powered | object (Image style) |\n| poweredText | object (Text style) |\n| separator | object (View style) |\n| imagePlaceholder | object (Image style) |\n\n### Geocoder\n```js\nimport { Geocoder } from 'react-native-geodb';\n\n// Returns a promise of nearby cities of the given location object\nGeocoder({ lat: xxxx, lng: xxxx }, key).then(response =\u003e {\n  console.log(response);\n});\n```\n\n\n### License\n\n[MIT](LICENSE)\n\n### Authors\n\n- [Babakolo Usman Suleiman](https://www.twitter.com/usbkay)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusmansbk%2Freact-native-geodb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fusmansbk%2Freact-native-geodb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusmansbk%2Freact-native-geodb/lists"}