Changeset 1098
- Timestamp:
- 07/15/09 13:37:20 (4 years ago)
- Location:
- trunk/mpdb-iphone/mpdb-iphone/Classes
- Files:
-
- 8 modified
-
MapController.m (modified) (2 diffs)
-
MetamorphicGradeController.m (modified) (2 diffs)
-
MineralsController.m (modified) (2 diffs)
-
PublicStatusController.m (modified) (2 diffs)
-
RockTypeController.m (modified) (3 diffs)
-
SearchCriteriaController.m (modified) (2 diffs)
-
SingleImageView.m (modified) (2 diffs)
-
TableController.m (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/mpdb-iphone/mpdb-iphone/Classes/MapController.m
r1097 r1098 111 111 //before making a pin, make sure the annotation does not have the same lat and long a sample 112 112 //if it does, move the pin slightly 113 /*for(int w=0; w<[mySamples count]; w++)113 for(int w=0; w<[mySamples count]; w++) 114 114 { 115 115 uniqueSamples *tempSample= [mySamples objectAtIndex:w]; 116 if((tempSample.coordinate.latitude == maxLat)) 117 { 118 if(coord.latitude >= 0) 119 { 120 coord.latitude+= .001; 121 } 122 else 123 { 124 coord.latitude -= .001; 125 } 126 if(coord.longitude > 0) 127 { 128 coord.longitude+= .001; 129 } 130 else 131 { 132 coord.longitude-=.001; 133 } 134 annotation.coordinate= coord; 135 break; 136 } 137 }*/ 138 139 for(int z=0; z< 4; z++) 116 if(tempSample.coordinate.latitude == maxLat) 117 { 118 maxLat+= .0001; 119 } 120 if(tempSample.coordinate.latitude== minLat) 121 { 122 minLat-=.0001; 123 } 124 if(tempSample.coordinate.longitude== maxLong) 125 { 126 maxLong+= .0001; 127 } 128 if(tempSample.coordinate.longitude == minLong) 129 { 130 minLong-= .0001; 131 } 132 } 133 for(int z=0; z< 4; z++) 140 134 { 141 135 uniqueSamples *newGroup=[uniqueSamples new]; … … 240 234 241 235 SearchCriteriaController *viewController= [[SearchCriteriaController alloc] initWithNibName:@"SearchCriteriaSummary" bundle:nil]; 242 [viewController setData:originalData:mySamples:mapType ];236 [viewController setData:originalData:mySamples:mapType:points]; 243 237 [viewController setCurrentSearchData:currentRockTypes :currentMinerals :currentMetamorphicGrades :currentPublicStatus:region:myLocation]; 244 238 self.criteriaController=viewController; -
trunk/mpdb-iphone/mpdb-iphone/Classes/MetamorphicGradeController.m
r1097 r1098 41 41 { 42 42 SearchCriteriaController *viewController= [[SearchCriteriaController alloc] initWithNibName:@"SearchCriteriaSummary" bundle:nil]; 43 [viewController setData:original:modifiedLocations:mapType ];43 [viewController setData:original:modifiedLocations:mapType:points]; 44 44 [viewController setCurrentSearchData:currentRockTypes :currentMinerals :currentMetamorphicGrades :currentPublicStatus:region:myCoordinate]; 45 45 self.criteriaController=viewController; … … 167 167 gradeName= [myMetamorphicGrades objectAtIndex:row]; 168 168 } 169 -(void)setData:(NSMutableArray*)originalData: (NSMutableArray*)locations:(NSString*)type 169 -(void)setData:(NSMutableArray*)originalData: (NSMutableArray*)locations:(NSString*)type:(NSMutableArray*)LatLongPoints 170 170 { 171 171 mapType=type; 172 172 original=originalData; 173 173 mylocations=locations; 174 points=LatLongPoints; 174 175 bool added; 175 176 int x, y, z, w; -
trunk/mpdb-iphone/mpdb-iphone/Classes/MineralsController.m
r1097 r1098 64 64 { 65 65 SearchCriteriaController *viewController= [[SearchCriteriaController alloc] initWithNibName:@"SearchCriteriaSummary" bundle:nil]; 66 [viewController setData:original:modifiedLocations:mapType ];66 [viewController setData:original:modifiedLocations:mapType:points]; 67 67 [viewController setCurrentSearchData:currentRockTypes :currentMinerals :currentMetamorphicGrades :currentPublicStatus:region:myCoordinate]; 68 68 self.criteriaController=viewController; … … 175 175 } 176 176 177 -(void)setData:(NSMutableArray*)originalData: (NSMutableArray*)locations:(NSString*)type 177 -(void)setData:(NSMutableArray*)originalData: (NSMutableArray*)locations:(NSString*)type:(NSMutableArray*)LatLongPoints 178 178 { 179 179 mapType=type; 180 180 original=originalData; //pass the array with the original search results so the map can be reset 181 181 myLocations=locations; 182 points= LatLongPoints; 182 183 183 184 //create an array containing the minerals that are in the remaining samples after some search criteria have been provided -
trunk/mpdb-iphone/mpdb-iphone/Classes/PublicStatusController.m
r1097 r1098 31 31 { 32 32 SearchCriteriaController *viewController= [[SearchCriteriaController alloc] initWithNibName:@"SearchCriteriaSummary" bundle:nil]; 33 [viewController setData:original:modifiedLocations:mapType ];33 [viewController setData:original:modifiedLocations:mapType:points]; 34 34 [viewController setCurrentSearchData:currentRockTypes :currentMinerals :currentMetamorphicGrades :currentPublicStatus:region:myCoordinate]; 35 35 self.criteriaController=viewController; … … 150 150 //the only array that needs to be passed is the one containing all the pin annotations since the 151 151 //public status string is a member of the annotation class 152 -(void)setData:(NSMutableArray*)originalData:(NSMutableArray*)locations:(NSString*)type 152 -(void)setData:(NSMutableArray*)originalData:(NSMutableArray*)locations:(NSString*)type:(NSMutableArray*)LatLongPoints 153 153 { 154 154 mapType=type; 155 points=LatLongPoints; 155 156 original=originalData; //we must pass the original search results so the map can be reset to its original values 156 157 myLocations=locations; -
trunk/mpdb-iphone/mpdb-iphone/Classes/RockTypeController.m
r1097 r1098 55 55 { 56 56 SearchCriteriaController *viewController= [[SearchCriteriaController alloc] initWithNibName:@"SearchCriteriaSummary" bundle:nil]; 57 [viewController setData:original:modifiedLocations:mapType ];57 [viewController setData:original:modifiedLocations:mapType:points]; 58 58 [viewController setCurrentSearchData:currentRockTypes :currentMinerals :currentMetamorphicGrades :currentPublicStatus:region:myCoordinate]; 59 59 self.criteriaController=viewController; … … 160 160 //if the sample has the correct rock type, add it to the new array 161 161 //[modifiedLocations addObject:[myLocations objectAtIndex:x]]; 162 -(void)setData:(NSMutableArray*) originalData:(NSMutableArray*)locations:(NSString*)type 162 -(void)setData:(NSMutableArray*) originalData:(NSMutableArray*)locations:(NSString*)type:(NSMutableArray*)LatLongPoints 163 163 { 164 164 mapType=type; … … 166 166 myLocations=locations; 167 167 myRockTypes=[[NSMutableArray alloc] init]; 168 points=LatLongPoints; 168 169 169 170 //initially add a blank line so the user is forced to move the scroll wheel -
trunk/mpdb-iphone/mpdb-iphone/Classes/SearchCriteriaController.m
r1097 r1098 446 446 //load the table containing the choices for search criteria so the user can add more 447 447 TableController *viewController = [[TableController alloc] initWithNibName:@"TableView" bundle:nil]; 448 [viewController setData:original:remainingLocations:mapType ];448 [viewController setData:original:remainingLocations:mapType:points]; 449 449 [viewController setCurrentSearchData:currentRockTypes :currentMinerals :currentMetamorphicGrades :currentPublicStatus:region:myCoordinate]; 450 450 self.tableController = viewController; … … 564 564 //this is the data of the annotations from the original search result and the current annotations that are left 565 565 //this information needs to be passed to the table controller where more search criteria can be added 566 -(void)setData:(NSMutableArray*)originalData:(NSMutableArray*)sampleLocations:(NSString*)type 566 -(void)setData:(NSMutableArray*)originalData:(NSMutableArray*)sampleLocations:(NSString*)type:(NSMutableArray*)LatLongPoints 567 567 { 568 568 mapType=type; 569 569 original=originalData; 570 570 remainingLocations= sampleLocations; 571 points= LatLongPoints; 572 571 573 } 572 574 -
trunk/mpdb-iphone/mpdb-iphone/Classes/SingleImageView.m
r1097 r1098 24 24 [imageView setUserInteractionEnabled:YES]; 25 25 //make a toolbar at the bottom of the view 26 NSMutableArray *buttons=[[NSMutableArray alloc] init];26 /*NSMutableArray *buttons=[[NSMutableArray alloc] init]; 27 27 UIBarButtonItem *barButton=[[UIBarButtonItem alloc] initWithTitle:@"Add Image To My Library" style:UIBarButtonItemStyleBordered target:self action:@selector(addToLibrary)]; 28 28 [buttons addObject:barButton]; … … 31 31 toolbar.frame = toolBarFrame; 32 32 toolbar.items=buttons; 33 [toolbar setBarStyle:1]; 33 [toolbar setBarStyle:1];*/ 34 34 //CGRect rect= CGRectMake(0, 0, imageView.frame.size.width, imageView.frame.size.height); 35 35 //scrollView.frame=rect;//[[UIScreen mainScreen] applicationFrame]; -
trunk/mpdb-iphone/mpdb-iphone/Classes/TableController.m
r1097 r1098 93 93 94 94 MetamorphicGradeController *viewController=[[MetamorphicGradeController alloc] initWithNibName:@"MetamorphicGradeView" bundle:nil]; 95 [viewController setData:original:locations:mapType ];95 [viewController setData:original:locations:mapType:points]; 96 96 [viewController setCurrentSearchData:currentRockTypes :currentMinerals :currentMetamorphicGrades :currentPublicStatus:region:myCoordinate]; 97 97 self.metamorphicGradeController= viewController; … … 106 106 RockTypeController *viewController = [[RockTypeController alloc] initWithNibName:@"RockTypeView" bundle:nil]; 107 107 //all of the following values must be passed so they can be passed back to the map straight from the rock view 108 [viewController setData:original:locations:mapType ];108 [viewController setData:original:locations:mapType:points]; 109 109 [viewController setCurrentSearchData:currentRockTypes :currentMinerals :currentMetamorphicGrades :currentPublicStatus:region:myCoordinate]; 110 110 self.rockTypeController = viewController; … … 117 117 { 118 118 PublicStatusController *viewController = [[PublicStatusController alloc] initWithNibName:@"PublicStatusView" bundle:nil]; 119 [viewController setData:original:locations:mapType ];119 [viewController setData:original:locations:mapType:points]; 120 120 [viewController setCurrentSearchData:currentRockTypes :currentMinerals :currentMetamorphicGrades :currentPublicStatus:region:myCoordinate]; 121 121 self.publicStatusController=viewController; … … 211 211 212 212 //set the various arrays in this controller with the information about the samples 213 -(void)setData:(NSMutableArray*)originalData:(NSMutableArray*)sampleLocations:(NSString*)type 213 -(void)setData:(NSMutableArray*)originalData:(NSMutableArray*)sampleLocations:(NSString*)type:(NSMutableArray*)LatLongPoints 214 214 { 215 215 original=originalData; 216 216 locations= sampleLocations; 217 217 mapType=type; 218 points=LatLongPoints; 218 219 } 219 220 -(void)setCurrentSearchData:(NSMutableArray*)rocks:(NSMutableArray*)mins:(NSMutableArray*)metgrades:(NSMutableArray*)public:(NSString*)aregion:(CLLocationCoordinate2D)coord
