Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
reviews
  • Loading branch information
Chris Yang committed Jan 21, 2021
commit fd0b1e30b49340546748ff9bc452b2c689f1d0ca
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ class MethodChannelGoogleMapsFlutter extends GoogleMapsFlutterPlatform {
));
break;
case 'tileOverlay#getTile':
final getTileCallback = _getTileCallbacks[mapId];
final MapGetTileCallback getTileCallback = _getTileCallbacks[mapId];
assert(getTileCallback != null);
final Tile tile = await getTileCallback(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if getTileCallback is null?

call.arguments['tileOverlayId'],
call.arguments['x'],
Expand Down Expand Up @@ -313,8 +314,10 @@ class MethodChannelGoogleMapsFlutter extends GoogleMapsFlutterPlatform {
}

/// Clears the tile cache so that all tiles will be requested again from the
/// [TileProvider]. The current tiles from this tile overlay will also be
/// cleared from the map after calling this method. The API maintains a small
/// [TileProvider].
///
/// The current tiles from this tile overlay will also be
/// cleared from the map after calling this method. The Google Map SDK maintains a small
/// in-memory cache of tiles. If you want to cache tiles for longer, you
/// should implement an on-disk cache.
@override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,10 @@ abstract class GoogleMapsFlutterPlatform extends PlatformInterface {
}

/// Clears the tile cache so that all tiles will be requested again from the
/// [TileProvider]. The current tiles from this tile overlay will also be
/// cleared from the map after calling this method. The API maintains a small
/// [TileProvider].
///
/// The current tiles from this tile overlay will also be
/// cleared from the map after calling this method. The Google Maps SDK maintains a small
/// in-memory cache of tiles. If you want to cache tiles for longer, you
/// should implement an on-disk cache.
Future<void> clearTileCache(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ class Tile {
final int height;

/// A byte array containing the image data.
///
/// The image data format accepted by platforms various based on platforms and versions.
final Uint8List data;

/// Converts this object to JSON.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class TileOverlayId {
/// Creates an immutable identifier for a [TileOverlay].
TileOverlayId(this.value) : assert(value != null);

/// value of the [TileOverlayId].
/// The value of the [TileOverlayId].
final String value;

@override
Expand All @@ -32,7 +32,7 @@ class TileOverlayId {
String toString() => '${objectRuntimeType(this, 'TileOverlayId')}($value)';
}

/// # A set of images which are displayed on top of the base map tiles.
/// 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.
///
Expand Down