objective-c - 百度地图上添加的图片没有显示,百度地图对添加的图片有要求吗?

 好富饶_152 发布于 2022-10-25 09:09

我在给百度地图添加图片时,大小800k左右的图片能显示,但是稍微大了就显示不了。在网上找了很长时间,也没有找到有效的解决方法。

相关代码 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)overlay

{

if ([overlay isKindOfClass:[BMKGroundOverlay class]]) {
    BMKGroundOverlayView *groundView = [[BMKGroundOverlayView alloc]initWithOverlay:overlay];
    return groundView;
}return nil;
}
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有