Code example for Marker

Methods: getPositionshowInfoWindow

0
	// handle the address list. Possible values are empty and 1 entry (maxResults=1) 
    @Override  protected void onPostExecute(List<Address> addressList) {
    	if (addressList.size() > 0){
    		mTextView.setText(describeAddress(addressList.get(0))); // success! show address
        }else{ 
        	mTextView.setText(mMarker.getPosition().toString()); // fail. Show lat/long
        } 
    	mMarker.showInfoWindow();
    } 
     
    // a posh toString(). Generates a displayable address string from an address 
	String describeAddress(Address address){
		return address.getThoroughfare() + " " + address.getLocality() + ", " + address.getAdminArea() + ", " + address.getCountryName();
	} 
     
} 
Experience pair programming with AI  Get Codota for Java