|
POST
|
I bundled my geodatabase with my app. When my app started I copied the geodatabase from the app bundle to the app's Documents folder and then created the gdb from the copy in the Documents.
... View more
03-25-2014
03:58 PM
|
0
|
0
|
1691
|
|
POST
|
Hi Nathan, Thanks a lot for the instructions and document links that I'll study. Cheers, Shimin
... View more
03-06-2014
12:28 PM
|
0
|
0
|
409
|
|
POST
|
Hi there, What do I need to do to set it up and start it up in offline mode using the *.geodatabase generated by the sample? Also is it possible to give the geodatabase a name instead of a random number when it is being generated? Thanks in advance. Shimin
... View more
02-25-2014
01:32 PM
|
0
|
2
|
1133
|
|
POST
|
Hi there, I'm adding a photo attachment to a feature and posting it to the server but unable to do it due to a network error that I couldn't figure out... Please help. In the Image Picker delegate method, the attachment is added to the feature attachmentManager and posted to the server: - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { NSString *mediaType = [info objectForKey:UIImagePickerControllerMediaType]; if ([mediaType isEqualToString:(NSString*)kUTTypeImage]) { // once they take/choose a picture, add it to the attachments collection and reload the table data UIImage *image = [info objectForKey:UIImagePickerControllerOriginalImage]; NSString *photoName = [@"Photo " stringByAppendingString:[NSString stringWithFormat:@"%d", [_attachmentManager.attachments count] + 1 ]]; [_attachmentManager addAttachmentAsJpgWithImage:image name:photoName]; if([_attachmentManager hasLocalEdits]) { [_attachmentManager postLocalEditsToServer]; } } [self.tableView reloadData]; [self dismissViewControllerAnimated:YES completion:NULL]; } In the feature attachment manager delegate method, the attachment.networkError occurs: -(void)attachmentManager:(AGSAttachmentManager *)attachmentManager didPostLocalEditsToServer:(NSArray *)attachmentsPosted { //loop through all attachments looking for failures BOOL _anyFailure = NO; NSString* reason; for (AGSAttachment* attachment in attachmentsPosted) { if(attachment.networkError!=nil || attachment.editResultError!=nil) { _anyFailure = YES; if(attachment.networkError!=nil) { reason = [@"Network Error: " stringByAppendingString:[attachment.networkError localizedDescription]]; NSLog(@"LocalizedDescription: %@", attachment.networkError.localizedDescription); NSLog(@"Description: %@", attachment.networkError.description); NSLog(@"LocalizedFailureReason: %@", attachment.networkError.localizedFailureReason); NSLog(@"UserInfo.Description: %@", attachment.networkError.userInfo.description); } else if(attachment.editResultError !=nil) { reason = [@"Edit Result Error: " stringByAppendingString: attachment.editResultError.errorDescription]; } } } if(_anyFailure) { //warn the user UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Warning: Unable to post attachment to server" message:reason delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil]; [alert show]; } } The NSLog details are: 2014-02-21 12:09:43.062 FCMapApp[2440:60b] LocalizedDescription: Empty username/password 2014-02-21 12:09:43.064 FCMapApp[2440:60b] Description: Error Domain=NSCocoaErrorDomain Code=401 "Empty username/password" UserInfo=0x166c4850 {NSURL=http://203.8.108.21/arcgis/rest/services/FeatureServices/BioData/FeatureServer/0/1/addAttachment, NSLocalizedDescription=Empty username/password} 2014-02-21 12:09:43.067 FCMapApp[2440:60b] LocalizedFailureReason: (null) 2014-02-21 12:09:43.069 FCMapApp[2440:60b] UserInfo.Description: { NSLocalizedDescription = "Empty username/password"; NSURL = "http://203.8.108.21/arcgis/rest/services/FeatureServices/BioData/FeatureServer/0/1/addAttachment"; } Do we need a usename/password to edit a feature service? I tried the OfflineFeatureEdittingSample and it does not work either on the live mode. However, on the local mode it can save the photo to the local replica geodatabase and later sync it to the live server... Any help is much appreciated. I'm using SDK 10.2.1 and ArcGIS Server 10.2.1 sync-enabled feature service. Kind regards, Shimin
... View more
02-20-2014
04:13 PM
|
0
|
1
|
3703
|
|
POST
|
Hi, I have a feature service that has two feature layers and one standalone table. I need to be able to edit the standalone table (add, delete and modify records). I haven't been able to find any documentation regarding how to do these... By peeking through the OfflineFeatureEditingSample in the ArcGIS Runtime SDK for iOS 10.2, my understanding is that editing the standalone table could be achieved offline by using the AGSGDBFeatureTable class in the local replica geodatabase and edits could be synced to the server when online. Is this correct? Any help is much appreciated. Regards, Shimin
... View more
01-07-2014
03:24 PM
|
0
|
2
|
3856
|
|
POST
|
Hi, I used two ways to create my tpks: 1. First create a cached map service for the same area you want to create a tpk for. During the creation of the cached map service you are able to define the tiling scale levels. The spatial reference for the service is picked up from the data frame of your map document. Then when you create your tpk you import the tiling scheme from either the cached map service you just create or its tiling scheme file which can be found in the path on your arcgis server: ...\<your service name>\Layers\Conf.xml. 2. Use the geoprocessing tool Generate Tile Cache Tiling Scheme to generate a tiling scheme file and then import it into your tpk. This tool can be found in the System Toolboxs\Data Management Tools.tbx\Tile Cache. Regards, Shimin
... View more
09-11-2013
04:59 PM
|
0
|
0
|
501
|
|
POST
|
Hi, Take a look at the 'Extract Package' tool in the Package toolset of the Data Management toolbox http://resources.arcgis.com/en/help/main/10.1/index.html#/Extract_Package/0017000000vq000000/ which I think can do the extraction for you... Regards, Shimin
... View more
07-19-2013
05:01 PM
|
0
|
0
|
3381
|
|
POST
|
Curious if there has been any progress figuring out why .tpk files larger than 2GB can't display using the iOS SDK. This issue is having a serious impact on the apps we produce. Also - we've been detecting some pretty steady memory leaks from tile extraction processes when using .tpk files in the 10.1.1 SDK. -Mike I uploaded my tpks to esri but haven't heard anything back from esri so far... Shimin
... View more
06-30-2013
04:43 PM
|
0
|
0
|
1388
|
|
POST
|
I tried both packaging the tpk with the ipa and adding it to the Documents folder via iTunes and there were no differences. I also tested my tpks with esri's LocalTiledLayer sample on the iPad simulator and observed the same results that if they can be displayed both my app and the sample are able to display them, otherwise they can't be displayed on both apps... The tpks were generated using the same mxd in ArcMap 10.1. I had to reduce the map extent in order to generate a tpk within 2gb in size. The tpk that can't be displayed on devices/simulator can be displayed in ArcMap without any problem... My email address: shimin.cai@fcnsw.com.au Shimin
... View more
05-29-2013
03:26 PM
|
0
|
0
|
1388
|
|
POST
|
I had exactly the same problem. My SDK version is not the latest one but 10.1.1. I have to constraint my tile packages within 2gb in size. I think there might be an extent limitation too... Shimin
... View more
05-28-2013
08:13 PM
|
0
|
0
|
1388
|
|
POST
|
Hi Nimesh, Thanks for your reply. Sorry my original question is a little bit confusing. Please let me make it clearer... The apps are all offline and have no access to any shared tpk in the Internet/network. I would like to know if there is a common location on the device where I can place my tpk and all my apps can access it while offline... At the moment I put my TPKs in the Documents folder of my app1. Because they are in the app1's Documents folder they are only accessible to the app1. My app2 requires the same set of TPKs. I don't really want to put a copy of the same set in the app2's Documents folder because of the tpk sizes and the storage capacity limitation of the devices... Can tpks on devices be shared while apps are offline? Thanks, Shimin
... View more
05-21-2013
05:48 PM
|
0
|
0
|
379
|
|
POST
|
Hi there, Is it possible to share tile package (*.tpk) across multiple apps on a device? Thanks, Shimin
... View more
05-20-2013
03:57 PM
|
0
|
3
|
799
|
|
POST
|
Hi Humza, I include the feature layer definition files in my app's bundle. When my app launches I copy the files to the app's Documents directory and then read the definitions from there to initialize the feature layers. The reason putting the files in the app's Documents directory is that should any of the definition changes I could use iTunes file sharing to update the files without having to recompile the app... Cheers, Shimin @implementation FCNSWGISAppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. //an example of the definition file name: lineFeatureLayerDefinition.json [FCNSWUtils copyFileInBoundleToDocumentsFolder:lineFeatureLayerDefinitionJsonFile withExtension:lineFeatureLayerDefinitionJsonFileExtension]; [FCNSWUtils copyFileInBoundleToDocumentsFolder:pointFeatureLayerDefinitionJsonFile withExtension:pointFeatureLayerDefinitionJsonFileExtension]; [FCNSWUtils copyFileInBoundleToDocumentsFolder:polygonFeatureLayerDefinitionJsonFile withExtension:polygonFeatureLayerDefinitionJsonFileExtension]; return YES; } @implementation FCNSWUtils +(NSString *) documentsPath { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; return documentsDirectory; } +(void) copyFileInBoundleToDocumentsFolder:(NSString *)fileName withExtension:(NSString *)extension { NSString *documentDirectory = [self documentsPath]; NSString *filePath = [documentDirectory stringByAppendingPathComponent:[NSString stringWithString:fileName]]; filePath = [filePath stringByAppendingString:@"."]; filePath = [filePath stringByAppendingString:extension]; //check if file is already in Documents folder //if not, copy it from the bundle. NSFileManager *fileManager = [NSFileManager defaultManager]; if(![fileManager fileExistsAtPath:filePath]) { //get the path of the file in the bundle NSString *pathToFileInBundle = [[NSBundle mainBundle] pathForResource:fileName ofType:extension]; //copy the file in the bundle to the Documents folder NSError *error = nil; bool success = [fileManager copyItemAtPath:pathToFileInBundle toPath:filePath error:&error]; if(success) { NSLog(@"File copied from bundle to Documents."); } else { NSLog(@"%@", [error localizedDescription]); } } }
... View more
05-07-2013
06:02 PM
|
0
|
0
|
1279
|
|
POST
|
Hi Humza, In this case you need to initialise the feature layer from a feature layer definition json file which is created for you when you are online and taking it offline in the tmp directory of the app in the iphone simulator. I copied the FeatureLayerDefinition json file to the Documents directory of my app and always initialize the feature layer with the json file regardless of online or offline... Hope this helps. Regards, Shimin
... View more
04-29-2013
10:57 PM
|
0
|
0
|
1279
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-08-2022 01:10 PM | |
| 1 | 09-19-2022 09:21 PM | |
| 1 | 05-23-2022 06:49 PM | |
| 1 | 03-24-2022 05:49 PM | |
| 1 | 10-31-2021 03:16 PM |
| Online Status |
Offline
|
| Date Last Visited |
2 weeks ago
|