English 中文(简体)
MKMapView Loading 数千名Pins on the Map
原标题:MKMapView Loading Thousands of Pins on the Map

我需要在MKMapView上展示数千个ins子,我需要一种良好的代议方法,在这种方法中,我可以添加ins子。 由于UserUpdateLoc被多次发射,因此情况不佳。 在MKMapView中添加数千个皮条的最佳方式。

最新资料:

我只用一个PBOOL检查来一次装上皮带,似乎确实好!

-(void) mapView:(MKMapView *) mv didUpdateUserLocation:(MKUserLocation *)userLocation
{
    NSLog(@"didUpdateUserLocation");

    if(self.isMapped) return; 

    for(Facility *facility in self.facilities) 
    {
        CLLocationCoordinate2D facilityCoord = { facility.latitude,facility.longitude };


        MapPoint *mp = [[MapPoint alloc] initWithCoordinate:facilityCoord title:facility.facilityName];



        [mv addAnnotation:mp];

    }

    self.isMapped = YES; 

}
最佳回答

我使用地图:地区: 我从按纬度和长度进行的核心数据过滤中提取数据,以获得目前区域和周边地区的纸浆,从而使用户能够在没有再次提取数据的情况下开发一个轨道。

当发现你时,你可以决定显示你数据的一种集束式版本,你可以使用K-Means算法预先计算或计算。

如果你拥有大量数据,使用基于结构而不是物体的轻型数据结构,则会有所帮助。

When adding and removing pins you may want to animate a fade-in/fade-out to smooth the transitions. It s a bad user experience to be popping in and out stuff on screen.

如果服务器电话涉及所有这一切,你就可以把国家安保行动电话列作一列,这样,当用户通过该地图移动太快时,你就可以放弃旧电话。

问题回答

暂无回答




相关问题
List Contents of Directory in a UITableView

I am trying to list the contents of Ringtones directory in a TableView, however, I am only getting the last file in the directory in ALL cells, instead of file per cell. This is my code: - (...

iPhone NSUserDefaults persistance difficulty

In my app i have a bunch of data i store in the NSUserdefaults. This information consists of an NSObject (Object1) with NSStrings and NSNumbers and also 2 instances of yet another object (Object2). ...

Writing a masked image to disk as a PNG file

Basically I m downloading images off of a webserver and then caching them to the disk, but before I do so I want to mask them. I m using the masking code everyone seems to point at which can be found ...

Resize UIImage with aspect ratio?

I m using this code to resize an image on the iPhone: CGRect screenRect = CGRectMake(0, 0, 320.0, 480.0); UIGraphicsBeginImageContext(screenRect.size); [value drawInRect:screenRect blendMode:...

Allowing interaction with a UIView under another UIView

Is there a simple way of allowing interaction with a button in a UIView that lies under another UIView - where there are no actual objects from the top UIView on top of the button? For instance, ...

热门标签