|
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
|
1280
|
|
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
|
1050
|
|
POST
|
I logged a support request on the issue. Thanks anyways.
... View more
08-31-2011
12:16 AM
|
0
|
0
|
444
|
|
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
|
1287
|
|
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
|
1280
|
|
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
|
1280
|
|
POST
|
ArcGIS Server runs on a web server. No, it can't be run on an iPad. ArcGIS for iOS (the app or SDK) is run on the iPhone or iPad and connects to ArcGIS Server to use provided layers. An iOS device could be made to run without an internet connection by creating an application with the SDK. The ArcGIS app that comes from the App Store can't do this. The SDK and the app are intended to be used with an internet connection.
... View more
08-29-2011
08:39 AM
|
0
|
0
|
397
|
|
POST
|
Another test result that might be helpful: I opened the GraphicsDemo v2.0 sample project for a test. After a breakpoint is set and the project is run, the same error message appears - "Can't show file for current stack frame". Thanks again for any help.
... View more
08-29-2011
08:32 AM
|
0
|
0
|
1280
|
|
POST
|
iOS SDK version 2.0. OS X Lion version 10.7.1. Xcode 4.2 (in use). Xcode 3.2 (also installed). iOS SDK 5.0 (deployment target is 4.3). Compiler is LLVM gcc 4.2 (no automatic reference counting). After placing a breakpoint in an implementation file and running the program in the simulator, I receive a message about a missing file related to the AGS object that was referenced near that breakpoint. The program cannot continue at this point - the same error message displays if I press the "step into" button. Running the program on the simulator or device produces the same error messages. If I place a breakpoint near AGSGraphic and run the program, this message is displayed:
Can't show file for current stack frame
The file /build/iosbuildbot/build/iOS/ArcGIS/Classes/Core/Models/AGSGraphic.m does not exist on the file system. If I place a breakpoint near AGSTiledMapServiceLayer, this message is displayed: Can't show file for current stack frame
The file /build/iosbuildbot/build/iOS/ArcGIS/Classes/Core/Models/Layers/ArcGISServer/AGSTiledMapServiceLayer.m does not exist on the file system. I found that the error messages only appear if breakpoints are present and I am stepping through the code. Using "continue" with breakpoints does not produce an error message. Without any breakpoints, the map loads just fine. I believe I have checked all the obvious settings. I reinstalled the SDK. Still the same error messages appear. Then, as a test, I started a new project (still using Xcode 4.2) from an ArcGIS iOS template. The implementation and xib files were created as empty files (xib can't even be edited). Obviously something is not right. It seems that something may be incorrect about the installation...? Interestingly enough, if I create a new ArcGIS project with Xcode 3.2, the implementation files and xib file contain the expected content - the project can be built and run without problems. Thank you for any help, Paul Lohr
... View more
08-29-2011
12:33 AM
|
0
|
12
|
2420
|
|
POST
|
Thanks for your quick response, Nimesh.
Server Information
Current Version: 10.02
SOAP URL: http://FTMSGIS2/arcgis/services
Secure SOAP URL: https://FTMSGIS2: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-25-2011
02:32 AM
|
0
|
0
|
1287
|
|
POST
|
I don't think Explorer Online takes MS Excel spreadsheets as input. Someone else might be able to verify this. Would it be reasonable to save the Excel file to csv format? This format does not support tabs since it is ASCII text - only the current tab will be exported.
... View more
08-25-2011
01:31 AM
|
0
|
0
|
517
|
|
POST
|
If you build your query in ArcGIS Explorer online checking Prompt for value, the user can fill in a value in ArcGIS for iOS. The query appears in the search section of the app, under Predefined Searches. The user has to know what value to type in - there will be no place to pick from a list. Is this what you were looking for?
... View more
08-24-2011
11:06 AM
|
0
|
0
|
1318
|
|
POST
|
Thanks for asking, Nimesh. Sorry I am late to respond. {
"operationalLayers": [ {
"url": "http://domain.com/ArcGIS/rest/services/folderName/serviceName/MapServer",
"visibility": true,
"opacity": 1,
"mode": 1,
"title": "JEI WQ Locations"
}],
"baseMap": {
"baseMapLayers": [{
"opacity": 1,
"visibility": true,
"url": "http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"
}],
"title": "JEI Water Quality Map"
},
"widgets": null,
"version": "1.1"
}
... View more
08-24-2011
10:53 AM
|
0
|
0
|
1287
|
|
POST
|
Sorry, I don't know the answer to this. You might ask Magellan if their GPS acts as a native GPS, as if it were a GPS on the iPhone using Apple's native code. If the Magellan GPS acts as an external GPS I would guess it will not work.
... View more
08-10-2011
08:53 AM
|
0
|
0
|
589
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-20-2025 07:01 AM | |
| 1 | 07-18-2024 10:19 AM | |
| 1 | 09-13-2024 05:27 AM | |
| 1 | 09-12-2024 12:27 PM | |
| 1 | 07-10-2024 04:04 AM |
| Online Status |
Offline
|
| Date Last Visited |
06-27-2025
08:54 AM
|