Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void)viewDidLoad {
- [super viewDidLoad];
- NSMutableArray *markersArray = [[NSMutableArray alloc] init];
- for(int i=0; i<10; i++){
- GMSMarker *marker = [[GMSMarker alloc] init];
- marker.position = CLLocationCoordinate2DMake(latitude, longitude);
- marker.appearAnimation=YES;
- marker.opacity = 0.0;
- mapView.selectedMarker = marker;
- marker.map = mapView;
- [markersArray addObject:marker];
- }
- }
- - (UIView*)mapView:(GMSMapView *)mapView markerInfoWindow:(GMSMarker *)marker {
- CustomInforwindow *customView = [[[NSBundle mainBundle] loadNibNamed:@"CustomInforwindow" owner:self options:nil] objectAtIndex:0];
- return customView;
- }
- mapView.selectedMarker = marker; this will open the infowindow for the last marker
- marker1.position = Locationcoorsinate2dobject;
- marker2.position = Locationcoorsinate2dobject;
- marker1.tappable = false;
- marker2.tappable = false;
- marker2.icon = [UIImage imageNamed:@"yourinfowindow.png"];
- marker2.groundanchor = CGPointMake(marker1.groundanchor.x, marker1.gorundanchor.y + 2.7);
Add Comment
Please, Sign In to add comment