Because of exposure to such a project, so the deep understanding of this function, relatively busy, so put the key code here, if there is a problem, please leave a message.
As follows: There may be offsets, which are not resolved here.
Here are a few ways to use the code:
Use the Google Maps API 3.0 protocol to resolve two latitude and longitude, to get the path of travel.
One of the more important methods:
}
This is the basic way to draw a line. Finally, a picture is generated.
Map Center Display
#pragma mark Mapview delegate functions
-(void) Mapview: (Mkmapview *) Mapview regionwillchangeanimated: (BOOL) animated
{
Route_view.hidden = YES;
}
-(void) Mapview: (Mkmapview *) Mapview regiondidchangeanimated: (BOOL) animated
{
[Self update_route_view];
Route_view.hidden = NO;
[Route_view Setneedsdisplay];
}
Original address: http://www.cocoachina.com/bbs/read.php?tid=71125
iphone development Map Line key code share