package com.ikea.kompis.stores;

import android.app.Activity;
import android.content.res.Resources;
import android.graphics.Point;
import android.location.Location;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.view.ViewParent;
import android.widget.Toast;
import com.google.android.m4b.maps.CameraUpdateFactory;
import com.google.android.m4b.maps.GoogleMap;
import com.google.android.m4b.maps.GoogleMap.CancelableCallback;
import com.google.android.m4b.maps.GoogleMap.OnCameraChangeListener;
import com.google.android.m4b.maps.GoogleMap.OnMarkerClickListener;
import com.google.android.m4b.maps.MapsInitializer;
import com.google.android.m4b.maps.Projection;
import com.google.android.m4b.maps.SupportMapFragment;
import com.google.android.m4b.maps.UiSettings;
import com.google.android.m4b.maps.model.BitmapDescriptor;
import com.google.android.m4b.maps.model.BitmapDescriptorFactory;
import com.google.android.m4b.maps.model.CameraPosition;
import com.google.android.m4b.maps.model.LatLng;
import com.google.android.m4b.maps.model.Marker;
import com.google.android.m4b.maps.model.MarkerOptions;
import com.ikea.kompis.IkeaApplication;
import com.ikea.kompis.stores.event.FavButtonPressedEvent;
import com.ikea.kompis.stores.event.FavMarkerPositionChangeEvent;
import com.ikea.kompis.stores.event.HeaderDrawnEvent;
import com.ikea.kompis.stores.event.HomeButtonPressedEvent;
import com.ikea.kompis.stores.event.StoreInfoSelectedEvent;
import com.ikea.kompis.stores.event.StoreInfoStateChangedEvent;
import com.ikea.kompis.stores.event.StoreMarkerSelectedEvent;
import com.ikea.kompis.stores.event.StoreSelectedEvent;
import com.ikea.kompis.util.UiUtil;
import com.ikea.shared.stores.model.StoreLocation;
import com.ikea.shared.stores.model.StoreRef;
import com.ikea.shared.stores.model.StoreRefList;
import com.ikea.shared.user.event.FavStoreChangeEvent;
import com.ikea.shared.util.L;
import com.ikea.shared.util.Util;
import com.squareup.otto.Bus;
import com.squareup.otto.Subscribe;
import java.util.ArrayList;
import java.util.Iterator;

public class MapFragment extends SupportMapFragment
  implements GoogleMap.OnMarkerClickListener
{
  private static final String CAMERA_POSITION = "CAMERA_POSITION";
  private static final int STORE_INFO_ANIM_DURATION = 800;
  private static final String STORE_INFO_STATUS = "STORE_INFO_STATUS";
  private static final float mZoom = 9.0F;
  private Marker favMarker;
  private boolean isStoreInfoOpen = false;
  private int mActionBarHeight;
  protected final Bus mBus = IkeaApplication.mBus;
  private CameraPosition mCameraPosition;
  private int mDeviceHight;
  private int mDeviceWidth;
  private EventHandler mEventHandler;
  private StoreRef mFavStore;
  private BitmapDescriptor mFavStoreMarker;
  private BitmapDescriptor mFavStoreMarkerSelected;
  private int mInfoCardHeight;
  private GoogleMap mMap;
  private StoreRef mSelectedStore;
  private int mSmallCardHeight;
  private int mStatusBarHeight;
  private BitmapDescriptor mStoreMarker;
  private BitmapDescriptor mStoreMarkerSelected;
  protected ArrayList<StoreRef> mStoreRef;
  protected StoreRefList mStoreRefList;
  private final ArrayList<Marker> markerList = new ArrayList();
  private Object obj = new Object();
  private Marker selectedMarker;

  private void addMarkers()
  {
    while (true)
    {
      Object localObject3;
      StoreRef localStoreRef;
      LatLng localLatLng;
      synchronized (this.obj)
      {
        this.mMap.clear();
        this.markerList.clear();
        this.selectedMarker = null;
        this.favMarker = null;
        localObject3 = new LatLng(0.0D, 0.0D);
        if ((this.mStoreRef == null) || (this.mStoreRef.isEmpty()))
          break;
        Iterator localIterator = this.mStoreRef.iterator();
        if (!localIterator.hasNext())
          break;
        localStoreRef = (StoreRef)localIterator.next();
        if ((localStoreRef.getStoreLocation() == null) || (TextUtils.isEmpty(localStoreRef.getStoreLocation().getLat())) || (TextUtils.isEmpty(localStoreRef.getStoreLocation().getLong())))
          continue;
        Double localDouble1 = Double.valueOf(localStoreRef.getStoreLocation().getLat());
        Double localDouble2 = Double.valueOf(localStoreRef.getStoreLocation().getLong());
        localLatLng = new LatLng(localDouble1.doubleValue(), localDouble2.doubleValue());
      }
      while (true)
      {
        Marker localMarker;
        synchronized (this.obj)
        {
          localMarker = this.mMap.addMarker(new MarkerOptions().position(localLatLng));
          if ((localStoreRef.equals(this.mStoreRef.get(0))) && (this.mSelectedStore == null))
            this.selectedMarker = localMarker;
          if ((this.mSelectedStore != null) && (localStoreRef.getStoreNo().equals(this.mSelectedStore.getStoreNo())))
            this.selectedMarker = localMarker;
          if ((this.selectedMarker != null) && (localMarker.equals(this.selectedMarker)))
          {
            if ((this.mFavStore != null) && (localStoreRef.getStoreNo().equals(this.mFavStore.getStoreNo())))
            {
              localMarker.setIcon(this.mFavStoreMarkerSelected);
              this.favMarker = localMarker;
              localMarker.showInfoWindow();
              localObject3 = localLatLng;
              this.markerList.add(localMarker);
              if (this.mCameraPosition != null)
                break label443;
              this.mMap.animateCamera(CameraUpdateFactory.newLatLngZoom((LatLng)localObject3, 9.0F));
              break;
              localObject2 = finally;
              throw localObject2;
            }
            localMarker.setIcon(this.mStoreMarkerSelected);
          }
        }
        if ((this.mFavStore != null) && (localStoreRef.getStoreNo().equals(this.mFavStore.getStoreNo())))
        {
          localMarker.setIcon(this.mFavStoreMarker);
          this.favMarker = localMarker;
        }
        else
        {
          localMarker.setIcon(this.mStoreMarker);
        }
      }
      label443: this.mCameraPosition = null;
    }
  }

  private StoreRef getMatchedStore(Marker paramMarker)
  {
    if ((this.mStoreRefList != null) && (this.mStoreRef != null) && (!this.mStoreRef.isEmpty()))
    {
      Iterator localIterator = this.mStoreRef.iterator();
      while (localIterator.hasNext())
      {
        StoreRef localStoreRef = (StoreRef)localIterator.next();
        if ((localStoreRef.getStoreLocation() != null) && (!TextUtils.isEmpty(localStoreRef.getStoreLocation().getLat())) && (!TextUtils.isEmpty(localStoreRef.getStoreLocation().getLong())) && (Util.getFormatedDistance(paramMarker.getPosition().latitude, false).equals(Util.getFormatedDistance(Double.valueOf(localStoreRef.getStoreLocation().getLat()).doubleValue(), false))) && (Util.getFormatedDistance(paramMarker.getPosition().longitude, false).equals(Util.getFormatedDistance(Double.valueOf(localStoreRef.getStoreLocation().getLong()).doubleValue(), false))))
          return localStoreRef;
      }
    }
    return null;
  }

  private void initMap()
  {
    this.mMap = getMap();
    if (this.mMap != null)
    {
      if (!this.isStoreInfoOpen)
        break label131;
      this.mMap.setPadding(0, 0, 0, this.mInfoCardHeight - this.mSmallCardHeight);
    }
    while (true)
    {
      this.mMap.setMyLocationEnabled(true);
      this.mMap.setOnMarkerClickListener(this);
      this.mMap.setInfoWindowAdapter(new MapWindowAdapter(getActivity()));
      UiSettings localUiSettings = this.mMap.getUiSettings();
      localUiSettings.setZoomControlsEnabled(false);
      localUiSettings.setMyLocationButtonEnabled(false);
      localUiSettings.setMapToolbarEnabled(false);
      if (this.mCameraPosition != null)
        this.mMap.moveCamera(CameraUpdateFactory.newCameraPosition(this.mCameraPosition));
      this.mMap.setOnCameraChangeListener(getCameraChangeListener());
      return;
      label131: this.mMap.setPadding(0, 0, 0, this.mSmallCardHeight);
    }
  }

  private void loadBitmap()
  {
    try
    {
      if ((this.mStoreMarker == null) || (this.mStoreMarkerSelected == null) || (this.mFavStoreMarker == null) || (this.mFavStoreMarkerSelected == null))
      {
        this.mStoreMarker = BitmapDescriptorFactory.fromResource(2130837748);
        this.mStoreMarkerSelected = BitmapDescriptorFactory.fromResource(2130837750);
        this.mFavStoreMarker = BitmapDescriptorFactory.fromResource(2130837744);
        this.mFavStoreMarkerSelected = BitmapDescriptorFactory.fromResource(2130837746);
      }
      return;
    }
    catch (Exception localException)
    {
      localException.printStackTrace();
    }
  }

  private void refreshUI()
  {
    if (this.mMap == null)
      initMap();
    if ((getActivity() != null) && (this.mMap != null))
      addMarkers();
  }

  private void updateCurrentStoreIconStatus()
  {
    if (this.favMarker != null)
    {
      Point localPoint = this.mMap.getProjection().toScreenLocation(this.favMarker.getPosition());
      if ((localPoint.x > 0) && (localPoint.x < this.mDeviceWidth) && (localPoint.y > this.mStatusBarHeight + this.mActionBarHeight) && (((!this.isStoreInfoOpen) && (localPoint.y < this.mDeviceHight - this.mSmallCardHeight + this.mStatusBarHeight)) || ((this.isStoreInfoOpen) && (localPoint.y < this.mDeviceHight - this.mInfoCardHeight + this.mStatusBarHeight + this.mActionBarHeight))))
        this.mBus.post(new FavMarkerPositionChangeEvent(true));
    }
    else
    {
      return;
    }
    this.mBus.post(new FavMarkerPositionChangeEvent(false));
  }

  public GoogleMap.OnCameraChangeListener getCameraChangeListener()
  {
    return new GoogleMap.OnCameraChangeListener()
    {
      public void onCameraChange(CameraPosition paramAnonymousCameraPosition)
      {
        MapFragment.this.updateCurrentStoreIconStatus();
      }
    };
  }

  public Marker getMatchedMarker(StoreLocation paramStoreLocation)
  {
    if ((this.markerList != null) && (!this.markerList.isEmpty()))
    {
      Iterator localIterator = this.markerList.iterator();
      while (localIterator.hasNext())
      {
        Marker localMarker = (Marker)localIterator.next();
        if ((paramStoreLocation != null) && (!TextUtils.isEmpty(paramStoreLocation.getLat())) && (!TextUtils.isEmpty(paramStoreLocation.getLong())) && (Util.getFormatedDistance(localMarker.getPosition().latitude, false).equals(Util.getFormatedDistance(Double.valueOf(paramStoreLocation.getLat()).doubleValue(), false))) && (Util.getFormatedDistance(localMarker.getPosition().longitude, false).equals(Util.getFormatedDistance(Double.valueOf(paramStoreLocation.getLong()).doubleValue(), false))))
          return localMarker;
      }
    }
    return null;
  }

  public void onAttach(Activity paramActivity)
  {
    super.onAttach(paramActivity);
    Bundle localBundle = getArguments();
    if (localBundle != null)
    {
      if (localBundle.containsKey("STORE_LIST_DATA"))
      {
        this.mStoreRefList = ((StoreRefList)localBundle.getSerializable("STORE_LIST_DATA"));
        this.mStoreRef = new ArrayList(this.mStoreRefList.getStoreRef());
      }
      if (localBundle.containsKey("FAV_STORE_DATA"))
        this.mFavStore = ((StoreRef)localBundle.getSerializable("FAV_STORE_DATA"));
      if (localBundle.containsKey("SELECTED_STORE_DATA"))
        this.mSelectedStore = ((StoreRef)localBundle.getSerializable("SELECTED_STORE_DATA"));
    }
  }

  public void onCreate(Bundle paramBundle)
  {
    if (paramBundle != null)
    {
      this.isStoreInfoOpen = paramBundle.getBoolean("STORE_INFO_STATUS", false);
      this.mCameraPosition = ((CameraPosition)paramBundle.getParcelable("CAMERA_POSITION"));
      if (paramBundle.containsKey("STORE_LIST_DATA"))
      {
        this.mStoreRefList = ((StoreRefList)paramBundle.getSerializable("STORE_LIST_DATA"));
        this.mStoreRef = new ArrayList(this.mStoreRefList.getStoreRef());
        paramBundle.remove("STORE_LIST_DATA");
      }
      if (paramBundle.containsKey("FAV_STORE_DATA"))
      {
        this.mFavStore = ((StoreRef)paramBundle.getSerializable("FAV_STORE_DATA"));
        paramBundle.remove("FAV_STORE_DATA");
      }
      if (paramBundle.containsKey("SELECTED_STORE_DATA"))
      {
        this.mSelectedStore = ((StoreRef)paramBundle.getSerializable("SELECTED_STORE_DATA"));
        paramBundle.remove("SELECTED_STORE_DATA");
      }
    }
    super.onCreate(paramBundle);
    try
    {
      MapsInitializer.initialize(getActivity().getApplicationContext());
      loadBitmap();
      this.mEventHandler = new EventHandler(null);
      this.mDeviceWidth = ((int)UiUtil.screenWidth(getActivity()));
      this.mDeviceHight = UiUtil.screenHeight(getActivity());
      this.mSmallCardHeight = ((int)getResources().getDimension(2131361918));
      this.mInfoCardHeight = (2 * this.mDeviceHight / 3);
      this.mActionBarHeight = ((int)getResources().getDimension(2131361870));
      this.mStatusBarHeight = UiUtil.getStatusBarHeight(getActivity());
      return;
    }
    catch (Exception localException)
    {
      while (true)
        localException.printStackTrace();
    }
  }

  public void onDestroy()
  {
    super.onDestroy();
    this.mStoreRef.clear();
    this.mStoreRef = null;
  }

  public boolean onMarkerClick(Marker paramMarker)
  {
    StoreRef localStoreRef = getMatchedStore(paramMarker);
    if (localStoreRef != null)
    {
      upDateMarker(localStoreRef.getStoreLocation(), paramMarker, false);
      this.mBus.post(new StoreMarkerSelectedEvent(localStoreRef));
    }
    return false;
  }

  public void onPause()
  {
    super.onPause();
    try
    {
      this.mBus.unregister(this.mEventHandler);
      return;
    }
    catch (Exception localException)
    {
      L.W("No event handler to unregister");
    }
  }

  public void onResume()
  {
    super.onResume();
    this.mBus.register(this.mEventHandler);
    if (this.mStoreRefList != null)
      refreshUI();
  }

  public void onSaveInstanceState(Bundle paramBundle)
  {
    super.onSaveInstanceState(paramBundle);
    paramBundle.putBoolean("STORE_INFO_STATUS", this.isStoreInfoOpen);
    CameraPosition localCameraPosition;
    LatLng localLatLng;
    if (this.mMap != null)
    {
      this.mMap.setPadding(0, 0, 0, this.mSmallCardHeight);
      localCameraPosition = this.mMap.getCameraPosition();
      localLatLng = localCameraPosition.target;
    }
    try
    {
      if ((this.selectedMarker != null) && (this.selectedMarker.getPosition() != null) && (localLatLng != null) && ((!Util.getFormatedDistance(this.selectedMarker.getPosition().latitude, false).equals(Util.getFormatedDistance(localLatLng.latitude, false))) || (!Util.getFormatedDistance(this.selectedMarker.getPosition().longitude, false).equals(Util.getFormatedDistance(localLatLng.longitude, false)))))
        this.mCameraPosition = localCameraPosition;
      paramBundle.putParcelable("CAMERA_POSITION", this.mCameraPosition);
      paramBundle.putSerializable("STORE_LIST_DATA", this.mStoreRefList);
      paramBundle.putSerializable("FAV_STORE_DATA", this.mFavStore);
      paramBundle.putSerializable("SELECTED_STORE_DATA", this.mSelectedStore);
      return;
    }
    catch (Exception localException)
    {
      while (true)
        localException.printStackTrace();
    }
  }

  public void onStop()
  {
    super.onStop();
    if (this.mMap != null)
      this.mMap.clear();
  }

  public void setData(StoreRefList paramStoreRefList, StoreRef paramStoreRef1, StoreRef paramStoreRef2)
  {
    if (getActivity() != null)
    {
      this.mStoreRefList = paramStoreRefList;
      this.mStoreRef = new ArrayList(this.mStoreRefList.getStoreRef());
      this.mSelectedStore = paramStoreRef2;
      this.mFavStore = paramStoreRef1;
      if ((this.mStoreRef != null) && (!this.mStoreRef.isEmpty()))
        refreshUI();
    }
  }

  public void upDateMarker(StoreLocation paramStoreLocation, Marker paramMarker, boolean paramBoolean)
  {
    if ((this.selectedMarker != null) && (this.mStoreMarker != null) && (this.mFavStoreMarker != null))
    {
      if ((this.favMarker != null) && (this.selectedMarker.equals(this.favMarker)))
      {
        this.selectedMarker.setIcon(this.mFavStoreMarker);
        this.selectedMarker.showInfoWindow();
      }
    }
    else if (paramMarker != null)
    {
      this.selectedMarker = paramMarker;
      if ((this.favMarker == null) || (!this.selectedMarker.equals(this.favMarker)))
        break label203;
      this.selectedMarker.setIcon(this.mFavStoreMarkerSelected);
      this.selectedMarker.showInfoWindow();
    }
    LatLng localLatLng;
    while (true)
    {
      if ((paramStoreLocation != null) && (!TextUtils.isEmpty(paramStoreLocation.getLat())) && (!TextUtils.isEmpty(paramStoreLocation.getLong())))
      {
        localLatLng = new LatLng(Float.valueOf(paramStoreLocation.getLat()).floatValue(), Float.valueOf(paramStoreLocation.getLong()).floatValue());
        if (!paramBoolean)
          break label224;
        this.mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(localLatLng, 9.0F));
      }
      return;
      this.selectedMarker.setIcon(this.mStoreMarker);
      this.selectedMarker.showInfoWindow();
      break;
      label203: this.selectedMarker.setIcon(this.mStoreMarkerSelected);
      this.selectedMarker.showInfoWindow();
    }
    label224: this.mMap.animateCamera(CameraUpdateFactory.newLatLng(localLatLng));
  }

  private class EventHandler
  {
    private EventHandler()
    {
    }

    @Subscribe
    public void handleFavButtonSelected(FavButtonPressedEvent paramFavButtonPressedEvent)
    {
      if ((MapFragment.this.getActivity() != null) && (MapFragment.this.mMap != null) && (MapFragment.this.mFavStore != null))
      {
        String str1;
        Double localDouble1;
        if ((MapFragment.this.mFavStore.getStoreLocation() != null) && (!TextUtils.isEmpty(MapFragment.this.mFavStore.getStoreLocation().getLat())) && (!TextUtils.isEmpty(MapFragment.this.mFavStore.getStoreLocation().getLong())))
        {
          if (!TextUtils.isEmpty(MapFragment.this.mFavStore.getStoreLocation().getLat()))
            break label291;
          str1 = "-1";
          localDouble1 = Double.valueOf(str1);
          if (!TextUtils.isEmpty(MapFragment.this.mFavStore.getStoreLocation().getLong()))
            break label308;
        }
        label291: label308: for (String str2 = "-1"; ; str2 = MapFragment.this.mFavStore.getStoreLocation().getLong())
        {
          Double localDouble2 = Double.valueOf(str2);
          LatLng localLatLng = new LatLng(localDouble1.doubleValue(), localDouble2.doubleValue());
          MapFragment.this.mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(localLatLng, 9.0F));
          if (MapFragment.this.favMarker == null)
            break label326;
          if ((MapFragment.this.selectedMarker != null) && (!MapFragment.this.selectedMarker.equals(MapFragment.this.favMarker)))
            MapFragment.this.selectedMarker.setIcon(MapFragment.this.mStoreMarker);
          MapFragment.access$402(MapFragment.this, MapFragment.this.favMarker);
          StoreRef localStoreRef = MapFragment.this.getMatchedStore(MapFragment.this.favMarker);
          MapFragment.this.selectedMarker.showInfoWindow();
          MapFragment.this.mBus.post(new StoreMarkerSelectedEvent(localStoreRef));
          return;
          str1 = MapFragment.this.mFavStore.getStoreLocation().getLat();
          break;
        }
        label326: Toast.makeText(MapFragment.this.getActivity(), "Favorite Store not in current Region", 0).show();
        return;
      }
      Toast.makeText(MapFragment.this.getActivity(), "No Favorite Yet", 0).show();
    }

    @Subscribe
    public void handleFavStoreChanged(FavStoreChangeEvent paramFavStoreChangeEvent)
    {
      if ((MapFragment.this.getActivity() != null) && (MapFragment.this.mMap != null))
      {
        MapFragment.access$202(MapFragment.this, paramFavStoreChangeEvent.favStore);
        Marker localMarker = MapFragment.this.getMatchedMarker(MapFragment.this.mFavStore.getStoreLocation());
        if (localMarker != null)
        {
          if ((MapFragment.this.favMarker != null) && (!MapFragment.this.favMarker.equals(localMarker)))
          {
            if (MapFragment.this.favMarker.equals(MapFragment.this.selectedMarker))
              MapFragment.access$402(MapFragment.this, null);
            MapFragment.this.favMarker.setIcon(MapFragment.this.mStoreMarker);
          }
          MapFragment.access$302(MapFragment.this, localMarker);
          MapFragment.this.favMarker.setIcon(MapFragment.this.mFavStoreMarkerSelected);
          MapFragment.this.favMarker.showInfoWindow();
          if ((MapFragment.this.selectedMarker != null) && (!MapFragment.this.selectedMarker.equals(localMarker)))
            MapFragment.this.selectedMarker.setIcon(MapFragment.this.mStoreMarker);
          MapFragment.access$402(MapFragment.this, MapFragment.this.favMarker);
        }
        MapFragment.this.updateCurrentStoreIconStatus();
      }
    }

    @Subscribe
    public void handleHeaderDrawn(HeaderDrawnEvent paramHeaderDrawnEvent)
    {
      MapFragment.access$802(MapFragment.this, paramHeaderDrawnEvent.headerHeight);
      int i = paramHeaderDrawnEvent.infoHeight;
      if (i > 2 * MapFragment.this.mDeviceHight / 3)
        i = 2 * MapFragment.this.mDeviceHight / 3;
      if (i != 0)
        MapFragment.access$1002(MapFragment.this, i);
    }

    @Subscribe
    public void handleHomeButtonSelected(HomeButtonPressedEvent paramHomeButtonPressedEvent)
    {
      Location localLocation = paramHomeButtonPressedEvent.currentLocation;
      if ((MapFragment.this.getActivity() != null) && (MapFragment.this.mMap != null) && (localLocation != null) && (localLocation.getLatitude() > -2147483648.0D) && (localLocation.getLongitude() > -2147483648.0D))
      {
        MapFragment.this.mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(localLocation.getLatitude(), localLocation.getLongitude()), 9.0F));
        return;
      }
      Toast.makeText(MapFragment.this.getActivity(), "Location not Found", 0).show();
    }

    @Subscribe
    public void handleStoreInfoState(StoreInfoStateChangedEvent paramStoreInfoStateChangedEvent)
    {
      CameraPosition localCameraPosition;
      if ((MapFragment.this.getActivity() != null) && (MapFragment.this.mMap != null) && (MapFragment.this.selectedMarker != null))
      {
        boolean bool = paramStoreInfoStateChangedEvent.isOpened;
        localCameraPosition = MapFragment.this.mMap.getCameraPosition();
        if (!bool)
          break label113;
        MapFragment.this.mMap.setPadding(0, 0, 0, MapFragment.this.mInfoCardHeight - MapFragment.this.mSmallCardHeight);
        MapFragment.access$1302(MapFragment.this, true);
      }
      while (true)
      {
        MapFragment.this.mMap.animateCamera(CameraUpdateFactory.newCameraPosition(localCameraPosition), 800, new GoogleMap.CancelableCallback()
        {
          public void onCancel()
          {
          }

          public void onFinish()
          {
            try
            {
              MapFragment.this.getView().getParent().requestLayout();
              return;
            }
            catch (Exception localException)
            {
              Log.i("MapFragment", "RequestLayout");
            }
          }
        });
        return;
        label113: MapFragment.this.mMap.setPadding(0, 0, 0, MapFragment.this.mSmallCardHeight);
        MapFragment.access$1302(MapFragment.this, false);
      }
    }

    @Subscribe
    public void handleStoreSelected(StoreInfoSelectedEvent paramStoreInfoSelectedEvent)
    {
      if ((MapFragment.this.getActivity() != null) && (MapFragment.this.mMap != null))
      {
        StoreRef localStoreRef = paramStoreInfoSelectedEvent.store;
        if ((localStoreRef != null) && (localStoreRef.getStoreLocation() != null))
        {
          Marker localMarker = MapFragment.this.getMatchedMarker(localStoreRef.getStoreLocation());
          MapFragment.access$702(MapFragment.this, localStoreRef);
          MapFragment.this.upDateMarker(localStoreRef.getStoreLocation(), localMarker, true);
        }
      }
    }

    @Subscribe
    public void handleStoreSelected(StoreSelectedEvent paramStoreSelectedEvent)
    {
      if ((MapFragment.this.getActivity() != null) && (MapFragment.this.mMap != null))
      {
        StoreRef localStoreRef = paramStoreSelectedEvent.store;
        if ((localStoreRef != null) && (localStoreRef.getStoreLocation() != null))
        {
          Marker localMarker = MapFragment.this.getMatchedMarker(localStoreRef.getStoreLocation());
          MapFragment.access$702(MapFragment.this, localStoreRef);
          MapFragment.this.upDateMarker(localStoreRef.getStoreLocation(), localMarker, true);
        }
      }
    }
  }
}

/* Location:           C:\Documents and Settings\Cesar Cabello Cea\Mis documentos\Downloads\apk-downloader\com.ikea.kompis-6_dex2jar.jar
 * Qualified Name:     com.ikea.kompis.stores.MapFragment
 * JD-Core Version:    0.6.2
 */