POST
|
I have not been able to find any samples that use AGSGeometryEngine projectGeometry: toSpatialReference:. Xcode is telling me that it cannot find a method named projectGeometry:toSpatialReference. The warning messages are: warning: Semantic Issue: Class method '+projectGeometry:toSpatialReference:'
not found (return type defaults to 'id')
'AGSGeometryEngine' may not respond to '+projectGeometry:toSpatialReference:'
Here is the code that generates the warning: (please note that myPoint is an AGSPoint...a type of AGSGeometry with it's spatial reference being 4326 (WGS1984)) AGSPoint *myPointReprojected;
myPointReprojected = [AGSGeometryEngine projectGeometry:myPoint
toSpatialReference:[AGSSpatialReference webMercatorSpatialReference]]; Thank you for even the smallest amount of help, Paul Lohr
... View more
09-15-2011
04:01 AM
|
0
|
9
|
3153
|
POST
|
Hello Nimesh, Thanks for stepping in to help me with this again. I have attached a few screen shots - a breakpoint and an error message. Keep in mind that this type of error will come up with a breakpoint set near any call to any AGS class. If you need anything else to make this easy, just let me know. Much appreciated. Paul Lohr
... View more
09-15-2011
12:27 AM
|
0
|
0
|
202
|
POST
|
Are you wanting to edit features that are stored locally on the iPhone or iPad?
... View more
09-14-2011
12:33 PM
|
0
|
0
|
219
|
POST
|
This is kind of old but what the heck. Is the spatial reference of the first layer added to the mapView the same as the feature layer you add afterwards? Or perhaps I am misunderstanding. Also, you mentioned that you remove the feature layer and then add it back in to get the features to display at the correct location. And, if you don't remove/add your features, they show up at 0,0. I did not see the remove/add operation in your code. You don't have to share this but I am interested since this is similar to a problem I am having with AGSGraphic. Paul Lohr
... View more
09-14-2011
03:42 AM
|
0
|
0
|
273
|
POST
|
Still working on this problem. I had an experienced programmer look at this and he was not sure what to do. Is there a way to tell Xcode not to try to step through these AGS implementation files? It seems like a strange request that might not make sense but I don't know what else to ask. Not being able to step through code makes the ArcGIS iOS sdk very difficult to work with.
... View more
09-14-2011
03:19 AM
|
0
|
0
|
616
|
POST
|
Thank you for helping, Nimesh. I suspect the problem is in my code. Now that I think about it, I have seen this before - where I have something wrong with my code but Xcode reports a missing implementation file of an underlying SDK instead of reporting the actual error. I found this information on stackoverflow but can't seem to find it again.
... View more
09-08-2011
06:14 AM
|
0
|
0
|
616
|
POST
|
Many of us struggle with a lack of cellular reception at some point. I am pretty sure that caching part of a map could only be done by writing a custom ArcGIS application. You could hire a developer to do this. Sorry I don't have a better answer.
... View more
09-06-2011
04:40 AM
|
0
|
0
|
271
|
POST
|
I've found that setting a breakpoint then stepping through the code will sometimes show where the problem is occurring. You may need to move the breakpoint in a trial and error process to find the problem. Maybe you've tried this already? Sorry I don't have more help on this.
... View more
09-06-2011
04:36 AM
|
0
|
0
|
609
|
POST
|
Here is another detail that may be helpful. It is right after the @synthesize mapView = _mapView statement runs that Xcode complains about a missing file. Which file Xcode is looking for varies based on where the breakpoint is placed. I am not sure why Xcode is looking for an implementation (m) file from the ArcGIS SDK - I think it should only need the header (h) file. Thanks again for any help, Paul Lohr
... View more
09-01-2011
03:09 AM
|
0
|
0
|
616
|
POST
|
Xcode 3.2 iOS SDK 4.2 ArcGIS for iOS SDK 2.0 I have lines in a comma-separated text file that I am reading into AGSPoints then putting the AGSPoints into AGSGraphics. The lines contain X and Y values. I push each AGSGraphic into an AGSGraphicsLayer. The problem is the AGSGraphic items are displaying at 0,0 on the map. Stepping through the code, the correct X and Y values are in myGraphicArray and are in myGraphicsLayer. Here is the code. Thank you for any help. MapView.h #import <UIKit/UIKit.h>
#import "ArcGIS.h"
@interface MapView : UIViewController {
AGSMapView *_mapView;
AGSSimpleMarkerSymbol *myMarkerSymbol;
AGSGraphicsLayer *myGraphicsLayer;
}
@property (nonatomic, retain) IBOutlet AGSMapView *mapView;
- (void)loadPointsOnMap;
@end MapView.m #import "MapView.h"
#import "GPS1AppDelegate.h"
#import "TextFileMgmt.h"
@implementation MapView
@synthesize mapView = _mapView;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
myMarkerSymbol = [[AGSSimpleMarkerSymbol alloc] init];
myMarkerSymbol = [AGSSimpleMarkerSymbol simpleMarkerSymbol];
myMarkerSymbol.color = [UIColor blueColor];
// create a graphics layer
myGraphicsLayer = [[AGSGraphicsLayer alloc] init];
myGraphicsLayer = [AGSGraphicsLayer graphicsLayer];
}
return self;
}
- (void)didReceiveMemoryWarning
{
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Release any cached data, images, etc that aren't in use.
}
#pragma mark - View lifecycle
-(void)viewDidLoad
{
// get extent of points in current file including user's location
// zoom to the new extent
[super viewDidLoad];
AGSTiledMapServiceLayer *tiledLayer = [[AGSTiledMapServiceLayer alloc]
initWithURL:[NSURL URLWithString:@"http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"]];
[self.mapView addMapLayer:tiledLayer withName:@"Aerial Basemap"];
[tiledLayer release];
NSLog(@"mapView: %@", self.mapView.spatialReference);
// call local method to place points on map.
[self loadPointsOnMap];
}
- (void)viewDidUnload
{
[super viewDidUnload];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
-(void)loadPointsOnMap
{
// alloc and init an instance of the TextFileMgmt class.
TextFileMgmt *textFileMgmt1 = [[TextFileMgmt alloc] init];
// run the parseTextFile method.
[textFileMgmt1 parseTextFile];
// now the points array should be filled with dictionary entries.
// feed each point into an AGSPoint object array.
NSMutableArray *myMarkerPointArray = [[NSMutableArray alloc] init];
NSLog(@"textFileMgmt1 dict_x_long = %@", [textFileMgmt1.points valueForKey:@"dict_x_long"]);
for ( NSDictionary *item in textFileMgmt1.points )
{
AGSPoint *myPoint = [[AGSPoint alloc] init];
myPoint = [AGSPoint pointWithX:[[item valueForKey:@"dict_x_long"] doubleValue]
y:[[item valueForKey:@"dict_y_lat"] doubleValue]
spatialReference:self.mapView.spatialReference];
[myMarkerPointArray addObject:myPoint];
[myPoint release];
}
NSLog(@"myMarkerPointArray contains: %@", myMarkerPointArray);
// once this for loop completes, we have an NSMutableArray holding AGSPoint instances.
// feed each AGSPoint from the myMarkerPoint array into an AGSGraphic object array.
NSMutableArray *myGraphicArray = [[NSMutableArray alloc] init];
for ( AGSPoint *item in myMarkerPointArray )
{
AGSGraphic *myGraphic = [[AGSGraphic alloc] init];
myGraphic = [AGSGraphic graphicWithGeometry:item
symbol:myMarkerSymbol
attributes:nil
infoTemplateDelegate:nil];
[myGraphicArray addObject:myGraphic];
[myGraphic release];
}
NSLog(@"myGraphicArray contains: %@", myGraphicArray);
// once this for loop completes, we have an array of AGSGraphic instances.
// send the AGSGraphic array to an AGSGraphicsLayer.
for ( AGSGraphic *item in myGraphicArray )
{
NSLog(@"item contains: %@", item);
// myGraphicsLayer was created in the init method.
[myGraphicsLayer addGraphic:item];
}
// our content should be ready for the map so add the layer.
NSLog(@"myGraphicsLayer: %@", myGraphicsLayer);
[self.mapView addMapLayer:myGraphicsLayer withName:@"Graphics Layer"];
[myGraphicsLayer dataChanged];
[myGraphicsLayer release];
}
- (void)dealloc
{
self.mapView = nil;
[super dealloc];
}
@end
... View more
08-31-2011
12:34 AM
|
0
|
1
|
883
|
POST
|
I logged a support request on the issue. Thanks anyways.
... View more
08-31-2011
12:16 AM
|
0
|
0
|
243
|
POST
|
Both the rest URL and token URL are on the same machine. I found that I needed the change the internal server name in rest.config to use the external domain name. I did that and enabled https on the services. Still, I am not able to access the map. I changed the services back to not requiring https since this did not work. Here is the information from the REST info page: SOAP URL: http://gis2.johnsoneng.com/arcgis/services
Secure SOAP URL: https://gis2.johnsoneng.com:443/arcgis/services
Authentication Information:
Is Token Based Security : True
Token Service Url : https://gis2.johnsoneng.com/ArcGIS/tokens
Supported Interfaces: REST
... View more
08-30-2011
07:37 AM
|
0
|
0
|
631
|
POST
|
I should have tested Xcode 3.2 under the same scenario before making my initial post. Sorry about that. Xcode 3.2 is producing nearly the same missing file error messages. I downloaded the CustomTiledLayer sample then opened it in Xcode 3.2 thinking that perhaps opening these other projects in Xcode 4 somehow corrupted or modified the project. This does not seem to be the case. Placing breakpoints and using step into in Xcode 3.2 produces these missing file error messages. Additionally, Xcode 3.2 gives a long string of error messages similar to this: "unable to read unknown load command 0x26". I am using the iOS 4.2 SDK in this case.
... View more
08-30-2011
12:39 AM
|
0
|
0
|
616
|
POST
|
I was thinking that because the Deployment Target is set to a supported version of iOS (4.3), perhaps it did not matter that iOS 5.0 was installed. Apparently this is not the case. I did not realize Xcode 4.2 was unsupported. I will try to make this work on iOS 4.2 / Xcode 3.2. Thank you for letting me know, Nimesh.
... View more
08-29-2011
11:41 PM
|
0
|
0
|
616
|
Title | Kudos | Posted |
---|---|---|
2 | 06-21-2024 12:35 PM | |
3 | 06-03-2024 01:30 PM | |
1 | 12-07-2023 06:03 AM | |
2 | 12-07-2023 08:41 AM | |
1 | 07-14-2023 12:47 PM |
Online Status |
Offline
|
Date Last Visited |
Wednesday
|