我在為百度地圖添加圖片時(shí),大小800k左右的圖片能顯示,但是稍微大了就顯示不了。在網(wǎng)路上找了很長(zhǎng)時(shí)間,也沒(méi)有找到有效的解決方法。
相關(guān)程式碼 BMKCoordinateBounds bound;
bound.southWest = coords[0];
bound.northEast = coords[1];
BMKGroundOverlay * ground = [BMKGroundOverlay groundOverlayWithBounds:bound icon:[UIImage imageNamed:@"F1F0CCACF4D156343C54652813477714.jpg"]];
代理方法
-(BMKOverlayView *)mapView:(BMKMapView *)mapView viewForOverlay:(id<BMKOverlay>)overlay
{
if ([overlay isKindOfClass:[BMKGroundOverlay class]]) {
BMKGroundOverlayView *groundView = [[BMKGroundOverlayView alloc]initWithOverlay:overlay];
return groundView;
}return nil;
}