Note that there are some explanatory texts on larger screens.

plurals
  1. POGetting the nearest results in Geocoder and show them and some other questions about Geocoder
    primarykey
    data
    text
    <p>I am working on an application which will have a textview/searchview or a more preferrable way to take a String, make a search of that string and show some results. And whenever the user clicks one of the result it will take user to the another Intent which have a map that points to the clicked results.</p> <p>I am searching this for days, I read many articles in here, or in Google Developer pages, I know that I need to use Geocoder, and for this I think the best one for my app is this Google API</p> <pre><code>http://maps.googleapis.com/maps/api/geocode/json?address="+geocodingSearch+"&amp;components=country:TR&amp;sensor=false"; </code></pre> <p>geocodingSearch will be the String that written by user. </p> <p>*My first question is does <code>sensor=true</code> makes a big difference? Do you prefer to use it? Or do you prefer something else?</p> <p>*In Google's example it uses <code>region=es</code> in one of them and <code>components=country:ES</code> in another of them. What are the differences between them? Also does it works perfectly, or using borders is better?</p> <p>*I don't have any problem of parsing JSON answer, but I am not sure about how to show the results. I want it to be seen as the way that search results as in the bottom. It doesn't need to make a search as the user types, but the result part will be better like this. Do I need to use a <code>SearchView</code> or something else?</p> <p>*And the final question is written in the title. Is it possible to get the nearest results at top in Google API part (I am able to get the Location), I don't want to limit by borders, but getting the nearest results will be better. If this is not possible I will try to sort them by making calculations with LatLong values.</p> <p>Thanks in advance, and I will be greatful by your helps.</p> <p><img src="https://i.stack.imgur.com/B3ina.png" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload