
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
nativescript-plugin-gplaces
Advanced tools
Nativescript plugin for Google Places API. Based on tylergrinn and debevv.

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-gplaces
To import:
import * as GooglePlaces from 'nativescript-plugin-gplaces';
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
}
);
<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) |
| addressComponents(ios only) | [type:string]:string | Object of addressComponents (available types) |
| 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-gplaces && 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 updatemultiDexEnabled option in gradlepickPlace() promise if user cancel the picking actionFAQs
Choose a place using Google Place Picker
We found that nativescript-plugin-gplaces 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.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.