Help funtion ConvertPointToLocation in map

Put problem concerning MapActivities, MapViews, Overlays and GPS in this forum.

Help funtion ConvertPointToLocation in map

Postby chemchethet » Fri May 20, 2011 2:38 pm

why Erro?? value address is null or = ""??? help me
Code: Select all
public String ConvertPointToLocation(GeoPoint point) {   
        String address = "";
        Geocoder geoCoder = new Geocoder(
            getBaseContext(), Locale.getDefault());
        try {
          List<Address> addresses = geoCoder.getFromLocation(
            point.getLatitudeE6()  / 1E6,
            point.getLongitudeE6() / 1E6, 1);
     
          if (addresses.size() > 0) {
            for (int index = 0;
       index < addresses.get(0).getMaxAddressLineIndex(); index++)
              address += addresses.get(0).getAddressLine(index) + " ";
          }
        }
        catch (IOException e) {       
          e.printStackTrace();
        }   
       
        return address;
      }
chemchethet
Once Poster
Once Poster
 
Posts: 1
Joined: Fri May 20, 2011 2:32 pm

Top

Return to Map Problems

Who is online

Users browsing this forum: No registered users and 4 guests