如何在ios应用程序中在谷歌地图上添加多个Pin码

如何在ios应用程序中在谷歌地图上添加多个Pin码,ios,iphone,xcode5,Ios,Iphone,Xcode5,我有在谷歌地图上添加单个pin码的代码。这项工作完全成功。 但当我添加第二个pin时,它会覆盖第一个pin。 这是我在地图上添加单个pin的代码 GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:latitude1 longitude:longitude1 zoom:18]; mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera]; mapVie

我有在谷歌地图上添加单个pin码的代码。这项工作完全成功。 但当我添加第二个pin时,它会覆盖第一个pin。 这是我在地图上添加单个pin的代码

GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:latitude1 longitude:longitude1 zoom:18];

mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera];
mapView_.myLocationEnabled = YES;

self.view = mapView_;
GMSMarker *marker = [[GMSMarker alloc] init];
marker.position = CLLocationCoordinate2DMake(latitude1, longitude1);
marker.title = @"Ahmedabad";
marker.snippet = @"India";
marker.map = mapView_;
marker.icon = [UIImage imageNamed:@"m1.png"];
self.view=mapView;
对于(int i=0;i
self.view=mapView;
对于(inti=0;i
self.view=self.googleMapView;
对于(inti=0;i
self.view=self.googleMapView;
对于(int i=0;i
self.view = mapView_;     
for(int i=0;i<[array count];i++)
{       
   GMSMarker *marker = [[GMSMarker alloc] init];
   marker.animated=YES;
   marker.position = CLLocationCoordinate2DMake(latitude,longitude);
   marker.title = @"name";
   marker.snippet = @"snippet";
   marker.map = mapView_;
}
self.view = self.googleMapView;     
for(int i=0;i<[markerArray count];i++)
{  
   CLLocationCoordinate2D location = [markerArray objectAtIndex:i];
   GMSMarker *marker = [[GMSMarker alloc] init];
   marker.animated=YES;
   marker.position = CLLocationCoordinate2DMake(location.latitude,location.longitude);
   marker.title = @"name";
   marker.snippet = @"snippet";
   marker.map = self.googleMapView;
}