User Tools

Site Tools


ios-labs-s14:class-08

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
ios-labs-s14:class-08 [2014/02/28 14:41]
mbarboi [Create Annotation Object]
ios-labs-s14:class-08 [2014/02/28 14:55] (current)
mbarboi
Line 224: Line 224:
 </​code>​ </​code>​
  
-When the user touches the trips button (the car icon) you should add the annotations. The method for adding annotations to a map is called //​addAnnotation//​. Create a new annotation object for each coordinate and add it to the map.+When the user touches the trips button (the car icon) you should add the annotations. The method for adding annotations to a map is called //​addAnnotation//​. Create a new annotation object for each start and stop coordinate and add it to the map. 
 + 
 +Note that the property called coordinate on the annotation object is of type CLLocationCoordinate2D-- you cannot pass the GPSCoordinate object! Instead, convert the lat and long from the GPSCoordinate object to the following helper function: 
 + 
 +  CLLocationCoordinate2DMake(LAT,​ LONG); 
 +   
 +Which returns an object of type CLLocation2D 
 ====Create Overlay==== ====Create Overlay====
   -Copy the following methods into MapRoot:   -Copy the following methods into MapRoot:
ios-labs-s14/class-08.txt · Last modified: 2014/02/28 14:55 by mbarboi