code: public static boolean setIcon(MarkerOptions markerOptions, IconRow icon, float density, IconCache iconCache) {
  
          boolean iconSet = false;
  
          if (icon != null) {
  
              Bitmap iconImage = createIcon(icon, density, iconCache);
              markerOptions.icon(BitmapDescriptorFactory
                      .fromBitmap(iconImage));
              iconSet = true;
  
              double anchorU = icon.getAnchorUOrDefault();
              double anchorV = icon.getAnchorVOrDefault();
  
              markerOptions.anchor((float) anchorU, (float) anchorV);
          }
  
          return iconSet;
      }
docs: Set the icon into the marker options
  
  @param markerOptions marker options
  @param icon          icon row
  @param density       display density: {@link android.util.DisplayMetrics#density}
  @param iconCache     icon cache
  @return true if icon was set into the marker options