objective-c - 百度地圖上新增的圖片沒有顯示,百度地圖對新增的圖片有要求嗎?
过去多啦不再A梦
过去多啦不再A梦 2017-05-02 09:27:05
0
0
604

我在為百度地圖添加圖片時,大小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<BMKOverlay>)overlay

{

if ([overlay isKindOfClass:[BMKGroundOverlay class]]) {
    BMKGroundOverlayView *groundView = [[BMKGroundOverlayView alloc]initWithOverlay:overlay];
    return groundView;
}return nil;
}
过去多啦不再A梦
过去多啦不再A梦

全部回覆(0)
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!