File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
library/src/main/java/com/airbnb/android/airmapview Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 29
29
import com .google .android .gms .maps .model .Polygon ;
30
30
31
31
import java .util .HashMap ;
32
+ import java .util .Map ;
32
33
33
34
public class NativeGoogleMapFragment extends SupportMapFragment implements AirMapInterface {
34
35
35
36
private GoogleMap googleMap ;
36
37
private OnMapLoadedListener onMapLoadedListener ;
37
38
private boolean myLocationEnabled ;
38
- private HashMap <Marker , AirMapMarker > markers ;
39
+ private final Map <Marker , AirMapMarker <?>> markers = new HashMap <>() ;
39
40
40
41
public static NativeGoogleMapFragment newInstance (AirGoogleMapOptions options ) {
41
42
return new NativeGoogleMapFragment ().setArguments (options );
@@ -61,7 +62,6 @@ public void init() {
61
62
public void onMapReady (GoogleMap googleMap ) {
62
63
if (googleMap != null && getActivity () != null ) {
63
64
NativeGoogleMapFragment .this .googleMap = googleMap ;
64
- NativeGoogleMapFragment .this .markers = new HashMap <>();
65
65
UiSettings settings = NativeGoogleMapFragment .this .googleMap .getUiSettings ();
66
66
settings .setZoomControlsEnabled (false );
67
67
settings .setMyLocationButtonEnabled (false );
Original file line number Diff line number Diff line change 35
35
36
36
import java .util .HashMap ;
37
37
import java .util .Locale ;
38
+ import java .util .Map ;
38
39
39
40
public abstract class WebViewMapFragment extends Fragment implements AirMapInterface {
40
41
41
42
private static final String TAG = WebViewMapFragment .class .getSimpleName ();
42
43
43
44
protected WebView webView ;
44
45
private ViewGroup mLayout ;
45
- private HashMap <Long , AirMapMarker > markers ;
46
46
private OnMapClickListener onMapClickListener ;
47
47
private OnCameraChangeListener onCameraChangeListener ;
48
48
private OnMapLoadedListener onMapLoadedListener ;
@@ -56,6 +56,7 @@ public abstract class WebViewMapFragment extends Fragment implements AirMapInter
56
56
private boolean loaded ;
57
57
private boolean ignoreNextMapMove ;
58
58
private View infoWindowView ;
59
+ private final Map <Long , AirMapMarker <?>> markers = new HashMap <>();
59
60
60
61
private boolean trackUserLocation = false ;
61
62
@@ -81,8 +82,6 @@ public class GeoWebChromeClient extends WebChromeClient {
81
82
webView = (WebView ) view .findViewById (R .id .webview );
82
83
mLayout = (ViewGroup ) view ;
83
84
84
- markers = new HashMap <>();
85
-
86
85
WebSettings webViewSettings = webView .getSettings ();
87
86
webViewSettings .setSupportZoom (true );
88
87
webViewSettings .setBuiltInZoomControls (false );
You can’t perform that action at this time.
0 commit comments