diff --git a/app/src/main/java/com/example/nemophila/MapsFragment.java b/app/src/main/java/com/example/nemophila/MapsFragment.java index 053faca..f01966f 100644 --- a/app/src/main/java/com/example/nemophila/MapsFragment.java +++ b/app/src/main/java/com/example/nemophila/MapsFragment.java @@ -70,14 +70,9 @@ private LatLng currentLatlng = null; private LatLng initialLatlng; private LatLng shopLatlng; -// private LatLng testLatlng; -// private LatLng testLatlng2; private LatLng tapLatlng; -// private CameraPosition nowCamera; -// private LatLng nowLatlng; private Marker currentMarker; private BitmapDescriptor bd; - private boolean isLongClick; LocationManager locationManager; @@ -198,11 +193,6 @@ //長押し時に店を作成し、その座標にピンを立てる //長押し時にその座標を保存し、投稿画面に移り、Shop作成完了時にはピンを立て、Shop画面に移行 mMap.setOnMapLongClickListener(longpushLocation -> { - //長押しされた位置の緯度経度を取得 - //LatLng newlocation = new LatLng(longpushLocation.latitude, longpushLocation.longitude); - - //長押し座標を画面中心にしておく - //zoomMap(longpushLocation.latitude, longpushLocation.longitude); //Nemophilaに座標を保存 nemophila.setCurrentLatitude(longpushLocation.latitude); nemophila.setCurrentLongitude(longpushLocation.longitude); @@ -220,12 +210,6 @@ mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() { @Override public boolean onMarkerClick(Marker marker) { - //店の詳細と投稿一覧を表示 - //ここでshopActivityを呼び出す - - //下からクリックしたことを通知 - //Toast.makeText(getActivity(), "ピンクリック", Toast.LENGTH_SHORT).show(); - //現在地マーカーをクリックしたときのみ例外 if(marker.getTag() == null) { //以下の処理をストップ @@ -260,9 +244,6 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); - //binding = ActivityMainBinding.inflate(getLayoutInflater()); - //getActivity().setContentView(binding.getRoot()); - if (ActivityCompat.checkSelfPermission( getContext(), Manifest.permission.ACCESS_FINE_LOCATION) @@ -275,12 +256,6 @@ locationStart(); } -// // Obtain the SupportMapFragment and get notified when the map is ready to be used. -// SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager() -// .findFragmentById(R.id.map); -// assert mapFragment != null; -// mapFragment.getMapAsync(this); - SupportMapFragment mapFragment = (SupportMapFragment) getChildFragmentManager().findFragmentById(R.id.map); if (mapFragment != null) { @@ -303,7 +278,6 @@ LatLng latlng = new LatLng(latitude, longitude); - // LatLngBounds (LatLng southwest, LatLng northeast) //左下、右上 LatLngBounds bounds = LatLngBounds.builder() .include(new LatLng(south, west))