The MapFragment object acts as a container for the map and provides access to the GoogleMap object. MapFragment, a subclass of the Android Fragment class, allows you to place a map in an Android fragment. Google Maps are loaded as a set of map "tiles," which are square pieces of imagery tied to geographic coordinates. You can set marker icons on your map and add overlays to the map, using objects you provide to GoogleMap. For example, GoogleMap has callback methods that respond to keystrokes and touch gestures on the map. You can control the behavior of maps with objects and methods of the API. Displaying controls such as pan and zoom.Displaying the map on the device screen.The GoogleMap object handles the following operations for you: The MapFragment and MapView objects represent the Android view components into which the map is loaded. The GoogleMap object allows you to programmatically interact with the map. To use the Google Maps API, you must register your app in the Google API Console and obtain an API key.Ī Google Map is represented by a GoogleMap object, plus a MapFragment object or a MapView object. For example, you can change the color of certain features to highlight them, limit the area a user can scroll in, display the user's location in real time, and much more. You can customize the look and feel of the map, as well as the map's behavior. The Google Maps API for Android lets you include a Google Map in your app. Businesses and other points of interest.Unit 6: Working with Architecture Components 1.2: Fragment lifecycle and communicationsĤ.3: Best practices: network, battery, compression
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |