Advertisement
Guest User

Untitled

a guest
Apr 19th, 2015
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. - (BOOL)mapView:(GMSMapView *)mapView didTapMarker:(GMSMarker *)marker {
  2.  
  3. if (marker.userData) {
  4. Property *property = marker.userData;
  5.  
  6. [[MessagesManager sharedInstance] showSpinner:self.view];
  7.  
  8. ...
  9.  
  10. return YES;
  11. } else {
  12. return NO;
  13. }
  14. }
  15.  
  16. if ([_points count]) {
  17. GMSMutablePath *rect = [GMSMutablePath path];
  18. [rect addCoordinate:_startDrawingPoint];
  19. for (id location in _points) {
  20. float lat = [[[_points objectForKey:location] valueForKey:@"lat"] floatValue],
  21. lng = [[[_points objectForKey:location] valueForKey:@"lng"] floatValue];
  22. CLLocationCoordinate2D coordinate = CLLocationCoordinate2DMake(lat, lng);
  23.  
  24. [rect addCoordinate:coordinate];
  25.  
  26. }
  27. GMSPolygon *polygon = [GMSPolygon polygonWithPath:rect];
  28. polygon.fillColor = [UIColor colorWithRed:0.25 green:0 blue:0 alpha:0.05];
  29. polygon.strokeColor = [UIColor blackColor];
  30. polygon.strokeWidth = 2;
  31. polygon.map = _mapView;
  32.  
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement