March 3rd, 2011, 05:02 AM
Create Overlayview for set of rectangles..
I am new iPhone developer and really looking for help on following issue I am stuck with. Any help would be appreciated.
I am trying to create overlay of set of rectangles to stack them on one another. I have required coordinates. I know how to create the polyline view and bound them by MapRect to make it visible on loadview.
// the data representing the route.
// Following lines create polyline for my coordinateArray, add into overlay, and make it visible on map
self.route = [MKPolyline polylineWithCoordinates:coordinateArray count:points.count];
[self.mapView setVisibleMapRect:[self.route boundingMapRect]];
- (MKOverlayView *)mapView:(MKMapView *)mapView viewForOverlay:(id <MKOverlay>)overlay
if ([overlay isKindOfClass:[MKPolyline class]])
self.routeView = [[[MKPolylineView alloc] initWithPolyline:self.route] autorelease];
self.routeView.fillColor = [UIColor redColor];
self.routeView.strokeColor = [UIColor redColor];
self.routeView.lineWidth = 8;
Now I want to convert all my coordinates into set of rectangles and bound them by the outer rectangle. Could anyone please help me on this.
Thanks in advance.