【发布时间】:2016-05-09 13:08:20
【问题描述】:
我正在创建一个应用程序,我必须在其中在地图上显示注册用户。我必须显示他们的个人资料图片。可能有很多,可能是 1000、2000 或 3000。
问题是,通过添加每张图片,它的内存使用量会增加并且应用程序会变慢。例如,我只使用了这段代码:
UIImageView * imgView = imgView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"like_r.png"]];
for(int i=0;i<1000;i++)
{
GMSMarker *marker = [[GMSMarker alloc] init];
marker.position = CLLocationCoordinate2DMake(31.4514885, 74.2642593);
marker.iconView = imgView;
marker.map=_mapView;
}
有没有在地图上显示所有用户的好方法?
【问题讨论】:
标签: ios google-maps google-maps-sdk-ios