I read through the google maps API documentation and under MapFragment, it advises to use the class only when targeting API 12 and above. Then I assume that SupportMapFragment targets API 11 and below, though google didn't explicit mention it in the documentation. Then what if I want to target a wide range of API lvl? Does SupportMapFragment also targets API above 11?
A Map component in an app. This fragment is the simplest way to place a map in an application. It's a wrapper around a view of a map to automatically handle the necessary life cycle needs.
public interface OnMapReadyCallback. Callback interface for when the map is ready to be used. Once an instance of this interface is set on a MapFragment or MapView object, the onMapReady(GoogleMap) method is triggered when the map is ready to be used and provides a non-null instance of GoogleMap .
public class MapFragment extends Fragment. A Map component in an app. This fragment is the simplest way to place a map in an application. It's a wrapper around a view of a map to automatically handle the necessary life cycle needs. Being a fragment, this component can be added to an activity's layout file simply with the XML below.
Google is committed to advancing racial equity for Black communities. See how. A Map component in an app. This fragment is the simplest way to place a map in an application. It's a wrapper around a view of a map to automatically handle the necessary life cycle needs.
public class SupportMapFragment extends Fragment A Map component in an app. This fragment is the simplest way to place a map in an application. It's a wrapper around a view of a map to automatically handle the necessary life cycle needs.
When this happens the MapFragment is no longer valid until the view is recreated again later when the MapFragment's onCreateView (LayoutInflater, ViewGroup, Bundle) method is called. Any objects obtained from the GoogleMap are associated with the view.
Then I assume that SupportMapFragment targets API 11 and below, though google didn't explicit mention it in the documentation.
SupportMapFragment
is for use with the Android Support package's backport of fragments. It can be used on Android devices running API 10 and lower, as well as Android devices running 11 and higher. MapFragment
requires the native API Level 11 fragment implementation, and therefore can only be used on API Level 11 and higher devices.
Note that there are no devices running API Level 11 that I know of -- everything has been upgraded at least to API Level 12.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With