package org.deke.risk.riskahead.helper;

import android.content.Context;

import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.model.MarkerOptions;
import com.google.maps.android.clustering.ClusterManager;
import com.google.maps.android.clustering.view.DefaultClusterRenderer;


public class OwnIconRendered extends DefaultClusterRenderer<IncidentReport> {

    Context context;

    public OwnIconRendered(Context context, GoogleMap map,ClusterManager<IncidentReport> clusterManager) {
        super(context, map, clusterManager);
        this.context = context;
    }

    @Override
    protected void onBeforeClusterItemRendered(IncidentReport item, MarkerOptions markerOptions) {
        markerOptions.icon(item.getIcon());
        markerOptions.snippet(item.getIncidentSubCategoryName(context));
        markerOptions.title(item.getIncidentCategoryName(context));
        super.onBeforeClusterItemRendered(item, markerOptions);
    }
}
