Hi Nithin!

Why doesn't the below code work?  It gets me 11 hits, all outside of
the box.  The one I'm really looking for is this:

http://maps.google.com/maps?f=q&source=s_q&hl=sv&geocode=&q=storgatan+5&sll=59.333857,18.087831&sspn=0.004367,0.00825&ie=UTF8&hq=&hnear=Storgatan+5,+11444,+Sverige&ll=59.33569,18.080717&spn=0.004366,0.00825&z=17

    final double SL_LOWER_LEFT_LAT = 58.9693;
    final double SL_LOWER_LEFT_LON = 17.1754;
    final double SL_UPPER_RIGHT_LAT = 59.8307;
    final double SL_UPPER_RIGHT_LON = 19.1907;

    Locale swedish = new Locale("sv");
    Geocoder geocoder = new Geocoder(this, swedish);
    locations =
        geocoder.getFromLocationName("Storgatan 5", 7,
                                     SL_LOWER_LEFT_LAT,
SL_LOWER_LEFT_LON,
                                     SL_UPPER_RIGHT_LAT,
SL_UPPER_RIGHT_LON);

  Regards //Johan

On 8 Okt, 10:36, Nithin <[email protected]> wrote:
> hi Walles,
>
> geocoder.getFromLocationName(locationName, 5); will return a list of
> values and here, 5 is the no. of results(values) we want. So according
> to that we can get the corresponding latitude and longitude..
>
> Thanks
> Nithin
>
> here, 5 is the total number of results, that we want,
>
> On Oct 8, 11:14 am, Walles <[email protected]> wrote:
>
> > How can I convert a street address into a latitude + longitude?
>
> > I've tried to use Geocoder.getFromLocationName() with a bounding box,
> > but all results I get are outside of the box.  Is there a way to limit
> > the hits to a certain area on earth?
>
> >    Regards //Johan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to