SORU
26 AĞUSTOS 2010, PERŞEMBE


Nasıl adresinden enlem ve boylam bulabilirim?

Google maps'te, bir adres yerini göstermek istiyorum.

Nasıl bir adres Google Maps API kullanarak enlem ve boylam alabilirim?

CEVAP
26 AĞUSTOS 2010, PERŞEMBE


public GeoPoint getLocationFromAddress(String strAddress){

Geocoder coder = new Geocoder(this);
List<Address> address;
GeoPoint p1 = null;

try {
    address = coder.getFromLocationName(strAddress,5);
    if (address == null) {
        return null;
    }
    Address location = address.get(0);
    location.getLatitude();
    location.getLongitude();

    p1 = new GeoPoint((int) (location.getLatitude() * 1E6),
                      (int) (location.getLongitude() * 1E6));

    return p1;
}

strAddress bir dize içeren Adres. address değişken dönüştürülmüş adreslerini tutar.

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • MW Technology

    MW Technolog

    28 EKİM 2009
  • thegeniuses.tv

    thegeniuses.

    11 Aralık 2006
  • UlyssesForever's channel

    UlyssesForev

    28 ŞUBAT 2012