TileOverlay class

A set of images which are displayed on top of the base map tiles.

These tiles may be transparent, allowing you to add features to existing maps.

Tile Coordinates

Note that the world is projected using the Mercator projection (see Wikipedia) with the left (west) side of the map corresponding to -180 degrees of longitude and the right (east) side of the map corresponding to 180 degrees of longitude. To make the map square, the top (north) side of the map corresponds to 85.0511 degrees of latitude and the bottom (south) side of the map corresponds to -85.0511 degrees of latitude. Areas outside this latitude range are not rendered.

At each zoom level, the map is divided into tiles and only the tiles that overlap the screen are downloaded and rendered. Each tile is square and the map is divided into tiles as follows:

  • At zoom level 0, one tile represents the entire world. The coordinates of that tile are (x, y) = (0, 0).
  • At zoom level 1, the world is divided into 4 tiles arranged in a 2 x 2 grid.
  • ...
  • At zoom level N, the world is divided into 4N tiles arranged in a 2N x 2N grid.

Note that the minimum zoom level that the camera supports (which can depend on various factors) is GoogleMap.getMinZoomLevel and the maximum zoom level is GoogleMap.getMaxZoomLevel.

The coordinates of the tiles are measured from the top left (northwest) corner of the map. At zoom level N, the x values of the tile coordinates range from 0 to 2N - 1 and increase from west to east and the y values range from 0 to 2N - 1 and increase from north to south.



TileOverlay({required TileOverlayId tileOverlayId, bool fadeIn = true, TileProvider? tileProvider, double transparency = 0.0, int zIndex = 0, bool visible = true, int tileSize = 256})
Creates an immutable representation of a TileOverlay to draw on GoogleMap.


fadeIn bool
Whether the tiles should fade in. The default is true.
hashCode int
The hash code for this object.
no setteroverride
mapsId TileOverlayId
A identifier for this object.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tileOverlayId TileOverlayId
Uniquely identifies a TileOverlay.
tileProvider TileProvider?
The tile provider to use for this tile overlay.
tileSize int
Specifies the number of logical pixels (not points) that the returned tile images will prefer to display as. iOS only.
transparency double
The transparency of the tile overlay. The default transparency is 0 (opaque).
visible bool
The visibility for the tile overlay. The default visibility is true.
zIndex int
The tile overlay's zIndex, i.e., the order in which it will be drawn where overlays with larger values are drawn above those with lower values


clone() TileOverlay
Returns a duplicate of this object.
copyWith({bool? fadeInParam, TileProvider? tileProviderParam, double? transparencyParam, int? zIndexParam, bool? visibleParam, int? tileSizeParam}) TileOverlay
Creates a new TileOverlay object whose values are the same as this instance, unless overwritten by the specified parameters.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
toJson() Object
Converts this object to JSON.
toString() String
A string representation of this object.


operator ==(Object other) bool
The equality operator.