Take the tour ×

I'm using google maps sdk in ios application, where I'm adding an array of markers on the mapview. The markers to be added to the mapview are too many in count, so its blocking the UI while loading the markers onto the map. Is there any other way to add the markers to the map which wont block the UI ? This is how I'm adding the markers to the mapview.

GMSMarker *marker = [[GMSMarker alloc] init];
marker.position = location;
marker.icon = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:imageName ofType:@"png"]];
marker.title = title;
marker.animated = animated;
marker.tappable = tappable;
marker.map = _mapView;

The above set of code is iterated using a for loop and the markers were created and added to the map.


share|improve this question
Say for example 1000 markers were added at a stretch in the google maps. –  Pradeep Rajkumar Jun 21 at 7:11
the mapview isn't 'thread safe' so while the icon could be loaded on the bg thread, the marker can't be added there –  Daij-Djan Jun 21 at 7:45
add comment


Your Answer



Browse other questions tagged or ask your own question.