question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Current location list issue

See original GitHub issue

Can someone please help in identify where I am going wrong. The current location is getting picked up but the list is not getting shown properly.

img_5770

`<GooglePlacesAutocomplete placeholder=‘Deliver To’ minLength={2} // minimum length of text to search autoFocus={false} returnKeyType={‘search’} // Can be left out for default return key https://facebook.github.io/react-native/docs/textinput.html#returnkeytype listViewDisplayed=‘auto’ // true/false/undefined fetchDetails={true} renderDescription={row => row.description || row.vicinity} // custom description render onPress={(data, details = null) => { // ‘details’ is provided when fetchDetails = true console.log(data, details); }} getDefaultValue={() => ‘’} query={{ // available options: https://developers.google.com/places/web-service/autocomplete key: ‘’, language: ‘en’, // language of the results types: ‘geocode’, // default: ‘geocode’ components: ‘country:au’, }}

  styles={{
    textInputContainer: {
      width: '100%',
      backgroundColor: 'rgba(0,0,0,0)',
      borderLeftWidth: 0.5,
      borderRightWidth: 0.5,
      
    },
    textInput: {
      fontFamily: "AvenirMedium",
      fontSize: 17,
      color: "#000",
      backgroundColor: 'rgba(0,0,0,0)',
      
    },
    description: {
      fontWeight: 'bold'
    },
    predefinedPlacesDescription: {
      color: '#1faadb'
    }
  }}
  
  currentLocation={true} // Will add a 'Current location' button at the top of the predefined places list
  currentLocationLabel="Current location"
  nearbyPlacesAPI={'GoogleReverseGeocoding'} // Which API to use: GoogleReverseGeocoding or GooglePlacesSearch
  GoogleReverseGeocodingQuery={{
    // available options for GoogleReverseGeocoding API : https://developers.google.com/maps/documentation/geocoding/intro
    key: '',
    language: 'en',
  }}
/>

`

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11

github_iconTop GitHub Comments

3reactions
sazo2300commented, Oct 31, 2018

I had a similar issue. On my end the list did get populated, but looked exactly like yours. The issue was the render details property didnt work. You have: renderDescription={row => row.description || row.vicinity} // custom description render i had: renderDescription={row => row.description }

Removing the render description fixed the issue for me. Havent played around to get it to work with the renderDescription property yet.

However, the current location now renders names of places, but i want it to show addresses, and i cant get it to cooporate with that…

1reaction
adarshperumalcommented, Nov 2, 2018

Hi @sazo2300 , Thanks a lot. That seemed to have solved the issue. My code retrieves the address now. Please let me know if you need any help with retrieving specific address. Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Manage your Android device's location settings - Android Help
Turn location on or off for your phone · Your phone's location isn't shared with any apps. · Google Location Accuracy won't collect...
Read more >
iOS: Location Services Not Working, fix - AppleToolBox
If your iPhone or iPad isn't showing your correct location, learn what to do when iOS location services are not working and fix...
Read more >
If Maps isn't working on your Apple device
Turn on Location Services and Location Access for Maps. In the Settings app, tap Privacy, then tap Location Services.
Read more >
Current location is not showing above the list in android. #671
In android current location option is not displayed above the list. <GooglePlacesAutocomplete placeholder='Search' //GooglePlacesDetailsQuery={{ ...
Read more >
Location Column in sharepoint list not defaulting to town/suburb
The 'Use This Location' is not a geolocation option,. Not sure if this was a recent update by MS or something with Bing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found