I need to display multiple markers on map by latitude and longitude, I tried below code to show two markers. It's working good , but if need to put marker on 20 or 30 locations , I need to alloc and init the GMSMarker that much of times. Is there any other way to show the multiple markers on map without initiating the GMSMarker for every place.
GMSMarker *marker = [[GMSMarker alloc] init];
marker.position = CLLocationCoordinate2DMake(17.4368, 78.4439);
#warning title and snipped must be dynamic
marker.icon = [UIImage imageNamed:@"one.png"];
marker.title = @"Sydney";
marker.snippet = @"Australia";
marker.appearAnimation = kGMSMarkerAnimationPop;
marker.map = _mapView;
GMSMarker *marker1 = [[GMSMarker alloc] init];
marker1.position = CLLocationCoordinate2DMake(17.398932, 78.472718);
marker1.icon = [UIImage imageNamed:@"one.png"];
marker1.map=_mapView;