Skip to content

Commit 407879a

Browse files
feat: add tile cache clearing (#499)
1 parent afd5491 commit 407879a

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

packages/google-maps/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,9 @@ function addTileOverlay(map: GoogleMap, tileOverlayOptions: TileOverlayOptions):
682682
| `visible` | `boolean` |
683683
| `tileProvider` | [TileProvider](#tile-providers) & Partial\<NativeObject\> |
684684
| `zIndex` | `number` |
685+
| `clearTileCache()` | `void` |
686+
687+
Setting tile overlay options after the tile overlay has been added to the map can have no effect on the tile overlay. To update the tile overlay, you may need to call `clearTileCache()`.
685688

686689
#### Removing Tile Overlays
687690

packages/google-maps/index.android.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1782,6 +1782,10 @@ export class TileOverlay implements Partial<ITileOverlay> {
17821782
set zIndex(value) {
17831783
this.native.setZIndex(value);
17841784
}
1785+
1786+
clearTileCache() {
1787+
this.native.clearTileCache();
1788+
}
17851789
}
17861790

17871791
export class Tile {

packages/google-maps/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,7 @@ export interface ITileOverlay {
742742
visible: boolean;
743743
tileProvider: TileProvider & Partial<NativeObject>;
744744
zIndex: number;
745+
clearTileCache(): void;
745746
}
746747

747748
export class Tile {

packages/google-maps/index.ios.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1706,6 +1706,10 @@ export class TileOverlay implements Partial<ITileOverlay> {
17061706
set zIndex(value) {
17071707
this.native.zIndex = value;
17081708
}
1709+
1710+
clearTileCache() {
1711+
this.native.clearTileCache();
1712+
}
17091713
}
17101714

17111715
export class Tile {

0 commit comments

Comments
 (0)