开发者

iPhone MapView - can I clear the cache of the map?

I am working on an iPhone app that uses a MKM开发者_JAVA百科apView inside of a view controller. I am doing requests to a server for events on the current displayed region on the map. The requests are done every time the user moves the map(or zooms) - in the regionDidChangeAnimated.

I noticed that after moving in the same area of the map, the regionDidChangeAnimated is not called anymore. It seems that the caching of the map might cause this to happen. If the user zooms in or out, regionDidChangeAnimated is called again. If the user returns to the zoom level where the method is not called, the bad/strange behaviour continues.

I do not know where else should I do the requests, as I need to update the map with annotations every time the user changes the displayed region.

I would really appreciate your advice, thank you in advance.


try this

 NSURLCache *sharedCache = [[NSURLCache alloc] initWithMemoryCapacity:0 diskCapacity:0 diskPath:nil];
[NSURLCache setSharedURLCache:sharedCache];
[sharedCache release];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜