GoogleマップをAndroid搭載携帯に置くことができます。私はGoogleマップの検索オプションを置く。ユーザーが場所を指定してボタンをクリックすると、Googleマップでその場所が検索されます。今私はユーザーが入力した名前を取得し、edittextの該当する場所を検索する方法
i try this code of button click
if (v == search) {
Geocoder geo = new Geocoder(getApplicationContext(),
Locale.getDefault());
try {
List<Address> addresses = geo.getFromLocationName(location
.getText().toString(), 5);
if (addresses.size() > 0) {
GeoPoint p = new GeoPoint((int) (addresses.get(0)
.getLatitude() * 1E6), (int) (addresses.get(0)
.getLongitude() * 1E6));
controller.animateTo(p);
controller.setZoom(12);
MapOverlay mapOverlay = new MapOverlay(getApplicationContext(),p);
List<Overlay> lisOverlays = view.getOverlays();
lisOverlays.clear();
lisOverlays.add(mapOverlay);
}
ボタン検索クリックが、それはまた場所を示し意味.....ユーザーがEdittext..Pleaseでロケーション名は私にすべての参照を与える与えるときの相対位置を表示します。私は編集テキストでユーザーの検索に応じた場所を表示したい
http://stackoverflow.com/questions/8428209/show-current-location-and-nearby-places-using-google-maps-api-in-android/8428414を必要といくつかの変更#8428414 – MKJParekh
問題を解決しましたか? –