{"id":15141977,"url":"https://github.com/dacrystal/nativescript-google-place-picker","last_synced_at":"2025-06-12T00:04:20.792Z","repository":{"id":143801847,"uuid":"95582973","full_name":"dacrystal/nativescript-google-place-picker","owner":"dacrystal","description":"This is a cross-platform (iOS \u0026 Android) Nativescript plugin for the Google Places Picker","archived":false,"fork":false,"pushed_at":"2017-06-29T01:22:54.000Z","size":19,"stargazers_count":6,"open_issues_count":4,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-02T15:50:42.345Z","etag":null,"topics":["nativescript","nativescript-plugin"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dacrystal.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":"2017-06-27T17:18:05.000Z","updated_at":"2024-05-30T16:26:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"8a722cc9-5336-482c-a396-9074d10e355c","html_url":"https://github.com/dacrystal/nativescript-google-place-picker","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"53d59fd3aa3d82bfe421cefe9bb1ac741e6dc129"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dacrystal/nativescript-google-place-picker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dacrystal%2Fnativescript-google-place-picker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dacrystal%2Fnativescript-google-place-picker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dacrystal%2Fnativescript-google-place-picker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dacrystal%2Fnativescript-google-place-picker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dacrystal","download_url":"https://codeload.github.com/dacrystal/nativescript-google-place-picker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dacrystal%2Fnativescript-google-place-picker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259368018,"owners_count":22846822,"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":["nativescript","nativescript-plugin"],"created_at":"2024-09-26T09:21:25.346Z","updated_at":"2025-06-12T00:04:20.787Z","avatar_url":"https://github.com/dacrystal.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"NativeScript plugin for Google Place Picker\n================\n\nThis is a cross-platform (iOS \u0026 Android) Nativescript plugin for the Google Places Picker\n\n- [Place Picker | Google Places API for Android](https://developers.google.com/places/android-api/placepicker)\n- [Place Picker | Google Places API for iOS](https://developers.google.com/places/ios-api/placepicker)\n\n\n\nPrerequisites\n===\n*iOS* - Cocoapods is [installed](https://guides.cocoapods.org/using/getting-started.html#getting-started)\n\n*Android* - Latest Google Play services SDK [installed](https://developer.android.com/sdk/installing/adding-packages.html)\n\n*Google Places API Key* - Go to the [Google Developers Console](https://console.developers.google.com), create a project, and enable the ` Google Places API for Android` and ` Google Places API for iOS` APIs.  Then under credentials, create an API key.\n\n*Google Maps API Key* - Go to the [Google Developers Console](https://console.developers.google.com), create a project, and enable the `Google Maps Android API` and `Google Maps SDK for iOS` APIs.  Then under credentials, create an API key.\n\n\n\nInstallation\n===\n\n## Install the plugin using the NativeScript CLI tooling\n\n```\ntns plugin add nativescript-google-place-picker\n```\n\n\nSetup Google Maps API\n===\n \n## Setup Android API Key\n\nAdd API key to app manifest(`AndroidManifest.xml`). Refer to [Android/add key](https://developers.google.com/places/android-api/start#api-key)\n\nThe plugin will default to latest available version of the Android `play-services-places` SDK.  If you need to change the version, you can add a project ext property `googlePlayServicesVersion` like so:\n\n```\n//   /app/App_Resources/Android/app.gradle\n\nproject.ext {\n    googlePlayServicesVersion = \"+\"\n}\n```\n\n## Setup iOS API Key\n\nIn the main script of your app `app.js`, use the following to add the API key (providing your key in place of `PUT_API_KEY_HERE`)\n\n```js\nif(application.ios) {\n  PlacePicker.iosProvideAPIKey(\"PUT_API_KEY_HERE\");\n}\n```\n\nIf you are using Angular, you need to modify the `app.module.ts` as follows:\n```js\nimport * as platform from \"platform\";\nimport {PlacePicker} from \"nativescript-google-place-picker\"\n....\nif (platform.isIOS) { \n  PlacePicker.iosProvideAPIKey(\"PUT_API_KEY_HERE\");\n}\n```\n\n### Usage Example\n```js\n...\npublic onShowPicker() {\n  var picker = new PlacePicker()\n\n  picker.present()\n      .then((r)=\u003e{\n          console.log(r.latitude)\n          console.log(r.longitude)\n      })\n      .catch((e)=\u003e{\n          console.log(\"Error: \"+e);\n      })\n}\n...\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdacrystal%2Fnativescript-google-place-picker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdacrystal%2Fnativescript-google-place-picker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdacrystal%2Fnativescript-google-place-picker/lists"}