
Company News
Socket Named to Rising in Cyber 2026 List of Top Cybersecurity Startups
Socket was named to the Rising in Cyber 2026 list, recognizing 30 private cybersecurity startups selected by CISOs and security executives.
nativescript-plugin-google-places
Advanced tools
Nativescript plugin for Google Places API

Set up the Google Places API keys before installing this plugin, the setup script will ask for them.
For the iOS key, click here then click "GET A KEY".
For the Android key:
If you want to use the getStaticMapUrl function you'll need to create a browser key:
tns plugin add nativescript-plugin-google-places
To import:
import * as GooglePlaces from 'nativescript-plugin-google-places';
Run the init function in the App.Module constructor if you're using angular or the app.ts file otherwise
GooglePlaces.init();
To have the user pick a place:
GooglePlaces.pickPlace()
.then(place => console.log(JSON.stringify(place)))
.catch(error => console.log(error));
To set a default location for the map to start on:
let center: Location = {
latitude: -33.865143,
longitude: 151.2099
}
let viewport = {
northEast: {
latitude: center.latitude + 0.001,
longitude: center.longitude + 0.001
},
southWest: {
latitude: center.latitude - 0.001,
longitude: center.longitude - 0.001
}
}
GooglePlaces.pickPlace(viewport)
.then(place => console.log(JSON.stringify(place)))
.catch(error => console.log(error));
To get places using ids:
GooglePlaces.getPlacesById([
"ChIJ4zPXqIiAhYAR31X3S64T6Uw",
"ChIJ6zMe3oWAhYARaZ33Z1BAMRo",
"ChIJAUWoGIaAhYARQ6zvky_f10Q"
])
.then((places: GooglePlaces.Place[]) => {
places.forEach(place => console.log(place.name));
})
.catch(error => console.log(error));
To get a static map:
this.staticMapUrl = GooglePlaces.getStaticMapUrl(
place,
{
width: 250,
height: 250
}
);
Or by address:
this.staticMapUrl = GooglePlaces.getStaticMapUrlByAddress(
place.address,
{
width: 250,
height: 250
}
);
<Image *ngIf="staticMapUrl" [src]="staticMapUrl" width="250" height="250"></Image>
You can use the light version:
<Image res="res://powered_by_google_light" stretch="none"></Image>
or the dark version:
<Image res="res://powered_by_google_dark" stretch="none"></Image>
| Place | ||
|---|---|---|
| name | string | The name of the place |
| address | string | Readable address |
| id | string | Unique ID of the place |
| attributions | string | Attributions of the place |
| types | string[] | List of place types (more info) |
| Location | ||
|---|---|---|
| latitude | number | latitude in degrees |
| longitude | number | longitude in degrees |
| ViewPort | ||
|---|---|---|
| southWest | Location | Default SouthWest corner of the map |
| northEast | Location | Default NorthEast corner of the map |
cd node_modules/nativescript-plugin-google-places && npm run configure
getPlacesById(id: string[]): Place[]Now you can be sure the places array you get from getPlacesById has the same number of elements and is in the same order as the ids you send it.
getStaticMapUrl(place: Place, options: { width: number, height: number }): stringnpm run configure to updategetStaticMapUrlByAddress(address: string, options: { width: number, height: number }): stringFAQs
Choose a place using Google Place Picker
The npm package nativescript-plugin-google-places receives a total of 14 weekly downloads. As such, nativescript-plugin-google-places popularity was classified as not popular.
We found that nativescript-plugin-google-places demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket was named to the Rising in Cyber 2026 list, recognizing 30 private cybersecurity startups selected by CISOs and security executives.

Research
Socket detected 84 compromised TanStack npm package artifacts modified with suspected CI credential-stealing malware.

Security News
A dispute over fsnotify maintainer access set off supply chain alarms around one of Go’s most widely used filesystem libraries.