Around Radius for aroundLatLngViaIP

Around Radius for aroundLatLngViaIP is not working properly, it displays all the places, but Around Radius for aroundLatLng works fine. please help.

Hi @localbookletdev,

so that we can help you with this issue, could you tell us more about what is not working for you using aroundRadius with aroundLatLngViaIP ?

To give you a precise answer, we would need to have as detailed information on what you are trying to achieve as possible, such as:

  • which query string and parameters you are testing
  • the result you are getting
  • the result you would like to get

You can also dm us the AppID and index name you are testing at support@algolia.com with a reference to this post and give us access to your data here: https://www.algolia.com/account/support.

Thanks!!

Hi Marie Gillier ,
My requirement to show restaurants of radius 5000 meters based on the user IP. I’tried using aroundLatLngViaIP, But I’m getting all the restaurants from my index. It works fine(shows the restaurants around 5km based on latitude and longitude) if i use aroundLatLng. But I want to use aroundLatLngViaIP for some reasons.

please find the attached index and my code.

Thanks!

I can’t see anything obviously wrong in your screenshots, but I also cannot check the value of your variables from there, which makes it difficult to debug :slight_smile:

I have set up a basic codesandbox showing aroundLatLngViaIP an aroundRadius working together:

You should be able to search into the airports within a 200km range from your location on this sandbox!

Let me know if this helps, you can also modify this sandbox with the minimal amount of code to replicate the issue, so that I can dig into your own code.

Cheers,

Marie

Thanks!

Can I see your index of the airports.