![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
react-native-places-input
Advanced tools
Up to date working Google Places Input. Calling directly API not JS SDK.
Up to date working Google Places Input. Calling directly API not JS SDK.
Fixing an issue with sometimes not getting details about selected place.
Fixed issue that in some cases list of places is not displayed.
Fixed issue in Android with TouchOpacity not clickable in Scroll View with absolute position.
Bug fixes:
New configuration props:
Remove default props for lat,lng and radius. Add queryCountries where you can pass array of countries to limit your search results.
yarn add react-native-places-input
or
npm install react-native-places-input
Fairly easy. Few required props but most of the work is already done in a component.
import PlacesInput from 'react-native-places-input';
And inside a component
<PlacesInput
googleApiKey={GOOGLE_API_KEY}
onSelect={place => console.log(place}
/>
class InputWrapper extends React.Component {
render() {
return (
<View style={{ width: '100%' }}>
<PlacesInput
googleApiKey={GOOGLE_API_KEY}
placeHolder={"Some Place holder"}
language={"en-US"}
onSelect={place => {
this.props.goToPoint(get(place, 'result.geometry.location.lat'), get(place, 'result.geometry.location.lng'))
}}
iconResult={<Ionicons name="md-pin" size={25} style={styles.placeIcon}/>}
/>
</View>
);
}
}
List of props supported by a component
Prop | Type | Default | Description |
---|---|---|---|
googleApiKey | PropTypes.string.isRequired, | Google API key | |
iconInput | PropTypes.any, | Icon added to an input | |
iconResult | PropTypes.any, | Icon added to results | |
language | PropTypes.string, | en | Language for google API call |
placeHolder | PropTypes.string, | Search places... | placeholder for an input |
queryFields | PropTypes.string, | formatted_address,geometry,name | Fields requested from Google API |
queryCountries | PropTypes.array | Array of country codes to limit results | |
resultRender | PropTypes.func, | place => place.description | Function to render results text |
searchLatitude | PropTypes.number, | Lat to limit results | |
searchLongitude | PropTypes.number, | Lng to limit results | |
searchRadius | PropTypes.number, | radius to limit results | |
stylesContainer | PropTypes.object, | {} | Custom styles for a container |
stylesInput | PropTypes.object, | {} | Custom styles for an input |
stylesItem | PropTypes.object, | {} | Custom styles for an item |
stylesItemText | PropTypes.object, | {} | Custom styles for an item text |
stylesList | PropTypes.object, | {} | Custom styles for a list |
stylesLoading | PropTypes.object, | {} | Custom styles for a loading indicator |
textInputProps | PropTypes.object, | {} | Custom TextInput props |
requiredCharactersBeforeSearch | PropTypes.number | 2 | Component wont fetch places unless string length is equal this prop |
requiredTimeBeforeSearch | PropTypes.number | 1000 | Idle time on text input before component will fetch places |
onSelect | PropTypes.func, | Function called when you select a place |
<PlacesInput
placeHolder={'Some placeholder'}
stylesContainer={{
position: 'relative',
alignSelf: 'stretch',
margin: 0,
top: 0,
left: 0,
right: 0,
bottom: 0,
shadowOpacity: 0,
borderColor: '#dedede',
borderWidth: 1,
marginBottom: 10
}}
stylesList={{
top: 50,
borderColor: '#dedede',
borderLeftWidth: 1,
borderRightWidth: 1,
borderBottomWidth: 1,
left: -1,
right: -1
}}
googleApiKey={GOOGLE_API_KEY}
onSelect={place => this.setState({place})}
/>
<PlacesInput
placeHolder={'Some placeholder'}
queryCountries={['pl', 'fr']}
googleApiKey={GOOGLE_API_KEY}
onSelect={place => this.setState({place})}
/>
<PlacesInput
placeHolder={'Some placeholder'}
searchRadius={500}
searchLatitude={51.905070}
searchLongitude={19.458834}
googleApiKey={GOOGLE_API_KEY}
onSelect={place => this.setState({place})}
/>
1.0.9
Fixing an issue with sometimes not getting details about selected place.
FAQs
Up to date working Google Places Input. Calling directly API not JS SDK.
The npm package react-native-places-input receives a total of 56 weekly downloads. As such, react-native-places-input popularity was classified as not popular.
We found that react-native-places-input 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.