capacitor-place-picker
v0.0.1
Published
Pick place or location with native performance
Downloads
3
Readme
capacitor-place-picker
Pick place or location with native performance
Install
npm install capacitor-place-picker
npx cap sync
API
pickPlace(...)
pickPlace(options: PlacePickerOptions) => Promise<PlacePickerResults>
| Param | Type |
| ------------- | ----------------------------------------------------------------- |
| options
| PlacePickerOptions |
Returns: Promise<PlacePickerResults>
Interfaces
PlacePickerResults
| Prop | Type |
| ---------------- | ----------------------------------------------------------------------- |
| coordinate
| PlacePickerCoordinate |
| address
| PlacePickerAddress |
| didCancel
| boolean |
PlacePickerCoordinate
| Prop | Type |
| --------------- | ------------------- |
| latitude
| number |
| longitude
| number |
PlacePickerAddress
| Prop | Type |
| ---------------- | ------------------- |
| name
| string |
| streetName
| string |
| city
| string |
| state
| string |
| zipCode
| string |
| country
| string |
PlacePickerOptions
| Prop | Type | Default |
| ------------------------ | ---------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| presentationStyle
| PlacePickerPresentationStyle | 'modal' | 'fullscreen' | PlacePickerPresentationStyle.fullscreen | 'fullscreen' |
| title
| string | 'Choose Place' |
| searchPlaceholder
| string | 'Search...' |
| color
| string | '#FF0000' |
| contrastColor
| string | '#FFFFFF' |
| locale
| string | 'en-US' |
| initialCoordinates
| PlacePickerCoordinate | {latitude: 25.2048, longitude: 55.2708 }
|
| enableGeocoding
| boolean | true |
| enableSearch
| boolean | true |
| enableUserLocation
| boolean | true |
| enableLargeTitle
| boolean | true |
| rejectOnCancel
| boolean | true |
Enums
PlacePickerPresentationStyle
| Members | Value |
| ---------------- | ------------------------- |
| modal
| 'modal' |
| fullscreen
| 'fullscreen' |