package plugin.google.maps;

import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.drawable.Drawable;

import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.squareup.picasso.Picasso;
import com.squareup.picasso.Target;

public class PicassoMarker implements Target {

    private final PluginAsyncInterface callback;
    private final AsyncLoadImageInterface asyncLoadImageInterface;

    public PicassoMarker(PluginAsyncInterface callback, AsyncLoadImageInterface asyncLoadImageInterface) {

        this.callback = callback;
        this.asyncLoadImageInterface = asyncLoadImageInterface;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        PicassoMarker that = (PicassoMarker) o;

        if (!callback.equals(that.callback)) return false;
        return asyncLoadImageInterface.equals(that.asyncLoadImageInterface);

    }

    @Override
    public int hashCode() {
        int result = callback.hashCode();
        result = 31 * result + asyncLoadImageInterface.hashCode();
        return result;
    }

    @Override
    public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) {

        float density = Resources.getSystem().getDisplayMetrics().density;
        int newHeight = (int) (bitmap.getHeight() * density);
        int newWidth = (int) (bitmap.getWidth() * density);
        Bitmap b = Bitmap.createScaledBitmap(bitmap, newWidth, newHeight, false);
        asyncLoadImageInterface.onPostExecute(b);
    }

    @Override
    public void onBitmapFailed(Drawable errorDrawable) {
        asyncLoadImageInterface.onPostExecute(null);
    }

    @Override
    public void onPrepareLoad(Drawable placeHolderDrawable) {

    }

}
@@ -1409,288 +1409,8 @@
 m) %7B
-%0A%0A        float density = Resources.getSystem().getDisplayMetrics().density;%0A        int newHeight = (int) (bitmap.getHeight() * density);%0A        int newWidth = (int) (bitmap.getWidth() * density);%0A        Bitmap b = Bitmap.createScaledBitmap(bitmap, newWidth, newHeight, false);
 %0A   
@@ -1453,16 +1453,21 @@
 xecute(b
+itmap
 );%0A    %7D
@@ -1683,9 +1683,10 @@
 %0A    %7D%0A%0A
-
 %7D
+%0A

Delete the escalating of the download images