Skip to content

labidiaymen/nativescript-google-places-autocomplete

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nativescript Google Places Autocomplete

npm version Twitter Follow

Add location autocomplete to your Nativescript application

Prerequisites

Create and grap your Api key from https://developers.google.com/maps/documentation/javascript/get-api-key?hl=en

Installation

npm install nativescript-google-places-autocomplete

Usage

    import { GooglePlacesAutocomplete } from 'nativescript-google-places-autocomplete';
	
	let API_KEY = "your_api_Key";
	let googlePlacesAutocomplete = new GooglePlacesAutocomplete(API_KEY);

	googlePlacesAutocomplete.search(params)
	      .then((places: any) => {
		      // place predictions list
           }, (error => {
              console.log(error)
          }));
          
	googlePlacesAutocomplete.getPlaceById(place.placeId).then((place) => {
	   .then(function () { });
        }, error => {
            console.log(error)
        })        

Plugin Auther : Aymen Labidi

License

Apache License Version 2.0, January 2004

About

A Nativescript plugin that works

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published