入力アドレスのこの関数の戻りGoogleマップ画像は、あなたが直接、ピカソの助けを借りて、アドレスの画像のURLをロードまたはグライドかあればできる緯度経度
public static String getLocationURLFromAddress(Context context,
String strAddress) {
Geocoder coder = new Geocoder(context);
List<android.location.Address> address;
LatLng p1 = null;
try {
address = coder.getFromLocationName(strAddress, 5);
if (address == null) {
return null;
}
android.location.Address location = address.get(0);
location.getLatitude();
location.getLongitude();
return "http://maps.googleapis.com/maps/api/staticmap?zoom=18&size=560x240&markers=size:mid|color:red|"
+ location.getLatitude()
+ ","
+ location.getLongitude()
+ "&sensor=false";
//
// p1 = new LatLng(location.getLatitude(), location.getLongitude());
} catch (Exception ex) {
ex.printStackTrace();
}
return strAddress;
// return p1;
}
を返すためにそれを変更することができます地図にマーカーを作りたいあなたはこのような何かを行うことができます: -
private void addMarker(LatLng currentLatLng) {
MarkerOptions options = new MarkerOptions();
// following four lines requires 'Google Maps Android API Utility Library'
// https://developers.google.com/maps/documentation/android/utility/
// I have used this to display the time as title for location markers
// you can safely comment the following four lines but for this info
IconGenerator iconFactory = new IconGenerator(this);
iconFactory.setStyle(IconGenerator.STYLE_PURPLE);
options.icon(BitmapDescriptorFactory.fromBitmap(iconFactory.makeIcon(mLastUpdateTime)));
options.anchor(iconFactory.getAnchorU(), iconFactory.getAnchorV());
Marker mapMarker = googleMap.addMarker(options);
long atTime = mCurrentLocation.getTime();
mLastUpdateTime = DateFormat.getTimeInstance().format(new Date(atTime));
mapMarker.setTitle(mLastUpdateTime);
Log.d(TAG, "Marker added.............................");
googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(currentLatLng,
13));
Log.d(TAG, "Zoom done.............................");
}
はhttp://stackoverflow.com/questions/24352192/を参照してください。 android-google-maps-add-marker-by-address – sasikumar