hansemannn / titanium-googlemaps

🗺 Use the Google Maps SDK in Titanium
Other
87 stars 26 forks source link

clearTileCache not working? #121

Closed de1mat closed 5 years ago

de1mat commented 6 years ago

I am grabbing tiles from a custom style in Mapbox I have created. If I change the style, and then rebuild the project and look at the same region of the map, the tiles do not appear to have changed when looking at the same region. But if I scroll to a new region, I can see the newly tiles appear with the new style applied as expected.

My code looks like this:

var tile = App.Maps.createTile({
    url: "https://api.mapbox.com/styles/v1/...",
    size: 512,
    zIndex: 1
});
// Clear previous tile cache from this URL
tile.clearTileCache();
map.addTile(tile);

I am using this code inside the "idle" event.

Is there any way to clear the entire tile cache in one step? Instead of just tile by tile? Or is that what clearTileCache is supposed to do? Either way, it does not seem to be clearing the cache at the moment, unless I am doing something wrong.

hansemannn commented 5 years ago

There is nothing this module can do to change this, sorry! Either file a ticket at Google for this or remove the tile cache manually. I assume they store it in some kind of meta directory like the app-cache or app-data directory.