Im trying to get the sublocality from Map API, when I use the following URL

http://maps.googleapis.com/maps/api/geocode/json?latlng=13.0445756,80.24470623333333&sensor=false

Im getting

{
               "long_name" : "T Nagar",
               "short_name" : "T Nagar",
               "types" : [ "sublocality", "political" ]
            },

But In Android MAP API code Im getting "Lakshimi Colony" as SubLocality or
some time NULL


Here is the code Im using to get

double latitude = location.getLatitude() ;
double longitude = location.getLongitude() ;


List<Address> addresses = gc.getFromLocation(latitude, longitude, 1);
Address address = addresses.get(0);
address.getSubLocality() ;


Anything I need to do to get it consistently? Or Can I use the above said
URL directly to get data?


On Tue, Nov 15, 2011 at 4:51 PM, Kristopher Micinski <[email protected]
> wrote:

> On Tue, Nov 15, 2011 at 2:44 AM, Siva Prakash <[email protected]>
> wrote:
> > Hi
> > What is the best way to get Sub Location
> >
>
> What is "sub location?"
>
> > Here is the code Im using
> > double latitude = location.getLatitude() ;
> > double longitude = location.getLongitude() ;
> >
> > List<Address> addresses = gc.getFromLocation(latitude, longitude, 1);
> > Address address = addresses.get(0);
> > address.getSubLocality() ;
> >
> > But most of the time it doesnt come back to me with SubLocality. If it is
> > not able to find the sublocality then is there any way for me to search
> in
> > another 500 - 1000 meters to get near by location and show?
> >
>
> Ah, looks like you want to ask this on a Maps API list...
>
> kris
>
> --
> 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

-- 
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