Using overlays

Overlays are images that are displayed on top of the original Google map. There are two types of overlays:

  • Ground overlays
  • Tile overlays

Let's discuss both of these in detail.

Ground overlays

Ground overlays are attached to latitude and longitude coordinates. They move when we drag or zoom a map. Ground overlays are really helpful when we wish to display a single image over the surface of the map. The following image is an example of a ground overlay, where the Android logo is displayed over the map:

Ground overlays

Adding a ground overlay

A ground overlay can be added using a GroundOverlayOptions object. By calling the image() method, you can set an image ...

Get Learning Android Google Maps now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.