How can I manually tell the TileLayerOptions to load and paint a tile? #963
Answered
by
JaffaKetchup
JaffaKetchup
asked this question in
Q&A
-
I need to do this as I'm implementing a way to remove grey tiles, but I can't change the base code in My existing code: @override
ImageProvider getImage(Coords<num> coords, TileLayerOptions options) {
// `preloadSurroundings` is a boolean dictating whether the grey tiles should be attempted to be removed
if (preloadSurroundings) {
for (double x = coords.x - 6; x < coords.x + 6; x++) {
for (double y = coords.y - 6; y < coords.y + 6; y++) {
/*_CachedTileImageProvider(
getTileUrl(Coords<num>(x, y)..z = coords.z, options),
Coords<num>(coords.x, coords.y)..z = coords.z,
cacheName: cacheName,
);*/
// How can I manually load AND PAINT the image above
}
}
}
return _CachedTileImageProvider(
getTileUrl(coords, options),
Coords<num>(coords.x, coords.y)..z = coords.z,
cacheName: cacheName,
);
} |
Beta Was this translation helpful? Give feedback.
Answered by
JaffaKetchup
Aug 3, 2021
Replies: 1 comment
-
Please see #966 for all further discussion. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
JaffaKetchup
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please see #966 for all further discussion.