2017-03-06 1 views
1

I-Code verwenden folgende Pins hinzufügen auf Google Kartenansicht in meiner App zur Karte:iOS Google Maps hinzufügen mehrere Pins auf der Karte

[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]; 

    }]; 

Problem ist, ich habe eigentlich 1337 Pins, so dass es langsam Art ist und laggy. Gibt es eine Möglichkeit, den Prozess zu beschleunigen?

Antwort

0

i gelöstes Problem durch folgende:

[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; 

    }]; 

Da Füllfarbe verursachen Leistungsprobleme i eine Art und Weise einfach gefunden mit bestimmten Koordinaten Bild anzuzeigen.

Verwandte Themen