search

Home  >  Q&A  >  body text

Objective-c - The pictures added on Baidu Map are not displayed. Does Baidu Map have any requirements for the pictures added?

When I add pictures to Baidu Map, pictures with a size of about 800k can be displayed, but if they are slightly larger, they cannot be displayed. I have been searching online for a long time and have not found an effective solution.

Related code 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;
}
过去多啦不再A梦过去多啦不再A梦2768 days ago637

reply all(0)I'll reply

No reply
  • Cancelreply