hansemannn / titanium-googlemaps

🗺 Use the Google Maps SDK in Titanium

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

clearTileCache not working?

de1mat opened this issue · comments

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.

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.