2017-03-06 10 views
1

上に複数のピンを追加します。iOS版Googleマップは、私は私のアプリでGoogleマップビューにマップするためにピンを追加するには、次のコードを使用してマップ

[self.vm.arrValues enumerateObjectsUsingBlock:^(GeoObject* _Nonnull go, NSUInteger idx, BOOL * _Nonnull stop) { 


     CLLocationCoordinate2D circleCenter = CLLocationCoordinate2DMake(go.latitude, go.longitude); 
     GMSCircle *circ = [GMSCircle circleWithPosition:circleCenter 
               radius:1000]; 
     circ.fillColor = [[UIColor redColor] colorWithAlphaComponent:0.5] ; 
     circ.map = _mapView; 
     circ.strokeColor = [UIColor clearColor]; 

    }]; 

問題ですが、私は実際に1337年のピンを持っているので、それは一種のゆっくりだと遅い。プロセスをスピードアップする方法はありますか?

答えて

0

私は、次のことで問題を解決:

[self.vm.arrValues enumerateObjectsUsingBlock:^(GeoObject* _Nonnull go, NSUInteger idx, BOOL * _Nonnull stop) { 

     GMSGroundOverlay *overlay = [GMSGroundOverlay groundOverlayWithPosition:CLLocationCoordinate2DMake(go.latitude,go.longitude) icon:self.circImg zoomLevel:12 ]; 
     overlay.map = _mapView; 

    }]; 

を充填する色は、私は単に特定の座標で画像を表示する方法を発見したパフォーマンスの問題を引き起こしていたので。

関連する問題