Read Google Places API Documentation at https://developers.google.com/places/android-api/?hl=pt-br
Create a new key to Google Places Api Web Service
var GPlaces = require("../../modules/nativescript-gplaces");
var googleServerApiKey = "your key api"
exports.onLoaded = function(args) {
GPlaces.setGoogleServerApiKey(googleServerApiKey)
GPlaces.setErrorCallback(onPlacesErrorCallback)
}
function onPlacesErrorCallback(text){
alert(text)
}
// run search
GPlaces.search(textSearch.text, types).then(function(result){
// search list
})
// get place details
GPlaces.details(placeId).then(function(place){
// place result
})