I working on map app and consider to using new function in iOS7 for MKTileOverlay and MKTileOverlayRenderer. But I googled around with no luck.
I found this thread, tell me to do subclassing MKTileOverlay
Hiding mapview when mapoverlay is visible ios7
Code from thread:
-(void)loadTileAtPath:(MKTileOverlayPath)path result:(void (^)(NSData *, NSError *))result
{
NSData *tile = [self someHowGetTileImageIntoNSDataBaseOnPath:path];
if (tile) {
result(tile, nil);
} else {
result(nil, [NSError errorWithDomain: CUSTOM_ERROR_DOMAIN code: 1 userInfo:nil]);
}
}
Question is:
[self someHowGetTileImageIntoNSDataBaseOnPath:path]
is load tileData
But How can I save tileData to DB?
And if I can get tileData from Database result(tile, nil);
is enough for make overlay show up?
Or I need to do something else after overwrite loadTileAtPath:result:
Thank you
I sorry for asking stupid question, Now I think I understand more about this MKTileOverlay.
May be looking around for a day make me stun and cannot understand it's library, Sorry again and hope this may help someone who face same problem.