开发者

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

开发者 https://www.devze.com 2023-03-23 11:05 出处:网络
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

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

精彩评论

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

关注公众号