|
@@ -45,7 +45,7 @@ public class ThreatMapFragment extends Fragment implements GoogleMap.OnInfoWindo
|
|
|
private static GoogleMap sMap = null;
|
|
|
private static View sView = null;
|
|
|
|
|
|
- private HashMap<String, String> mMarkerIDToSSID = new HashMap<String, String>();
|
|
|
+ private HashMap<String, String> sMarkerIDToSSID = new HashMap<String, String>();
|
|
|
|
|
|
private LocationClient mLocationClient;
|
|
|
private static final LocationRequest REQUEST = LocationRequest.create()
|
|
@@ -79,8 +79,8 @@ public class ThreatMapFragment extends Fragment implements GoogleMap.OnInfoWindo
|
|
|
MainActivity.getInstance().displayView(MainActivity.MainMenuItem.RECORDS.getValue());
|
|
|
RecordOverviewFragment recordOverviewFragment = (RecordOverviewFragment)MainActivity.getInstance().getCurrentFragment();
|
|
|
if (recordOverviewFragment != null) {
|
|
|
- String ssid = mMarkerIDToSSID.get(marker.getId());
|
|
|
- recordOverviewFragment.showDetailsForSSID(this.getActivity() ,ssid);
|
|
|
+ String ssid = sMarkerIDToSSID.get(marker.getId());
|
|
|
+ recordOverviewFragment.showDetailsForSSID(getActivity(), ssid);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -222,12 +222,11 @@ public class ThreatMapFragment extends Fragment implements GoogleMap.OnInfoWindo
|
|
|
: " attacks")).position(
|
|
|
center));
|
|
|
|
|
|
- mMarkerIDToSSID.put(marker.getId(), ssid);
|
|
|
+ sMarkerIDToSSID.put(marker.getId(), ssid);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
sMap.setMyLocationEnabled(true);
|
|
|
- sMap.setOnInfoWindowClickListener(this);
|
|
|
|
|
|
LatLng tudarmstadt = new LatLng(49.86923, 8.6632768); // default location
|
|
|
sMap.moveCamera(CameraUpdateFactory.newLatLngZoom(tudarmstadt, 13));
|
|
@@ -266,6 +265,9 @@ public class ThreatMapFragment extends Fragment implements GoogleMap.OnInfoWindo
|
|
|
// map already exists
|
|
|
//e.printStackTrace();
|
|
|
}
|
|
|
+ if (sMap != null) {
|
|
|
+ sMap.setOnInfoWindowClickListener(this);
|
|
|
+ }
|
|
|
|
|
|
return sView;
|
|
|
}
|