https://github.com/itsteknas/ngx-place-picker
Angular components to help pick location using google maps and places API
https://github.com/itsteknas/ngx-place-picker
angular google google-maps-api location maps ngx picker place
Last synced: about 2 months ago
JSON representation
Angular components to help pick location using google maps and places API
- Host: GitHub
- URL: https://github.com/itsteknas/ngx-place-picker
- Owner: itsTeknas
- License: mit
- Created: 2019-04-18T13:54:14.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-05-30T09:50:19.000Z (about 4 years ago)
- Last Synced: 2025-03-09T08:02:15.872Z (over 1 year ago)
- Topics: angular, google, google-maps-api, location, maps, ngx, picker, place
- Language: TypeScript
- Homepage: https://itsteknas.github.io/ngx-place-picker/
- Size: 260 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ngx-place-picker
Angular components to help pick location using google maps and places API
[Live Preview](https://itsteknas.github.io/ngx-place-picker/).
## Installation
`npm install --save ngx-place-picker`
## Usage
``` html
```
## Inputs
**`[enableCurrentLocation]`** *`(boolean)`*: Defaults the map to current location
**`[enablePlacesSearch]`** *`(boolean)`*: Enable a search bar to search via Google places API
**`[defaultLocation]`** *`(Location)`*: Pass a default location to center the map
```
{
lat: 0,
lng: 0,
zoom: 14
}
```
**`[vSize]`** *`(number)`*: vertical size of the map, Horizontal size is taken from the parent
## Outputs
**`(locationChanged)`** *`(Location)`*: Selected location
## Library initialization
Add the script tag for Google maps in your html file
```
```
Replace the **API_KEY** with api key obtained from google cloud console
You can skip the `&libraries=places` if you don't intend to use the search.
If your app immediately shows the map widget, you'll have to remove `async defer` from the script tag