Closed tibudiyanto closed 8 years ago
Hi, @theaidorus
Do not work with this?
public class MapViewActivityFragment extends SupportMapFragment implements OnMapReadyCallback{
private GoogleMap googleMap;
// public MapViewActivityFragment() {
// }
// @Override
// public View onCreateView(LayoutInflater inflater, ViewGroup container,
// Bundle savedInstanceState) {
// super.onCreateView(inflater, container, savedInstanceState);
// return inflater.inflate(R.layout.fragment_map_view, container, false);
// }
// @Override
// public void onDestroyView() {
// super.onDestroyView();
// Fragment fragment = (getFragmentManager().findFragmentById(R.id.map));
// FragmentTransaction ft = getActivity().getSupportFragmentManager().beginTransaction();
// ft.remove(fragment);
// ft.commit();
// }
@Override
public void onMapReady(GoogleMap googleMap) {
LatLng sf = new LatLng(37.774128, -122.421053);
googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(sf, 15));
}
}
For a long time, there is no response. So, we will close the issue.
Hi I am trying to use google maps with this library; yet I am receiving this error saying:
I know that this means that the library is trying to get a null Fragment. But I dont know how to fix this. Can someone help me?
this is the code:
main activity:
Map fragment:
XML fragment_map_view:
Thanks