[Mono-bugs] [Bug 613812] New: MKMapView.AddOverlay() only supports MKOverly, It needs to support shapes.
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Sat Jun 12 04:10:52 EDT 2010
http://bugzilla.novell.com/show_bug.cgi?id=613812
http://bugzilla.novell.com/show_bug.cgi?id=613812#c0
Summary: MKMapView.AddOverlay() only supports MKOverly, It
needs to support shapes.
Classification: Mono
Product: MonoTouch
Version: SVN
Platform: Other
OS/Version: Other
Status: NEW
Severity: Major
Priority: P5 - None
Component: Class Libraries
AssignedTo: gnorton at novell.com
ReportedBy: jclancey at resdat.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-US)
AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.70 Safari/533.4
After many failed to add a MKPolygon to a MKMapview, I found the following
instruction in and many others like it in the iphone 4.0 forums. You will note
it adds the shape file to the overlay.
Basically what you do to make your Polylines is a two part process:
1)
CLLocationCoordinate2D polyPoints[x];
// Set your points
MKPolyline *pl = [MKPolyline polylineWithCoordinates:polyPoints count:x];
[mapView addOverlay:pl];
2) Implement the various overlay delegates you need, this one likely being the
main one you'd use. Adjust as needed based on your specific overlay needs.
- (MKOverlayView *)mapView:(MKMapView *)mapView viewForOverlay:(id
<MKOverlay>)overlay {
MKPolylineView *plv = [[[MKPolylineView alloc] initWithOverlay:overlay]
autorelease];
plv.strokeColor = [UIColor redColor];
plv.lineWidth = 1.0;
// Any other view twiddles you need.
return plv;
}
Reproducible: Always
Steps to Reproduce:
mapview.AddOverlay(new MKPolygon())
Actual Results:
It errors
Expected Results:
Accepts the shape file
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list