|
POST
|
Hi, I used the similar code to cut polygon or line and it all worked fine including the Z cutter. The only code difference is that I used AGSPolyline for the cutter instead of AGSMutablePolyline. Try this and see if it makes any difference: AGSPolyline* cutline = (AGSPolyline*)self.mapView.sketchLayer.geometry; Regards, Shimin
... View more
10-19-2014
06:13 PM
|
0
|
1
|
651
|
|
POST
|
Hi Divesh, Thanks for the suggestion. Yes I did. It uses a sketchGraphicsLayer as the mapView.touchDelegate and inserts a point into the sketchGraphicsLayer in the locationManager's delegate whenever there is a location update. If I don't set up the map's touch delegate it doesn't work. In my case, the map's touch delegate has been already used by the sketching (point, line & poly) on the main thread. I need to record user's movement in a background thread without any user interaction... Thanks, Shimin
... View more
08-25-2014
09:28 PM
|
0
|
0
|
645
|
|
POST
|
Hi Gagandeep, Thanks for the idea. I'll give it a go... Cheers, Shimin
... View more
08-25-2014
09:08 PM
|
0
|
0
|
645
|
|
POST
|
Hi, I'm looking for ideas of how to track user's movement in background thread... While user is collecting point, line or polygon features and moving around in field, I also want to record his route and ultimately save it as a line feature to the local geodatabase. Note that the map's touch delegate has been already used by the sketch layer in the main thread. Is this possible? Thanks, Shimin
... View more
08-22-2014
12:09 AM
|
0
|
4
|
2533
|
|
POST
|
Hi Doug, I tried your recommendation but got the same error. Thanks for your reply anyway. It seems the problem has something to do with our network as I tried the esri ArcGIS app which couldn't load a webmap made of the service either. However, out of our network, I don't have this problem and my app can load the service, and the ArcGIS app can load the same webmap too... Cheers, Shimin
... View more
08-04-2014
09:44 PM
|
0
|
0
|
708
|
|
POST
|
Hi All, I'm loading an external map service using code below and having an error of "Illegal start of token [<]". However I'm able to access and view the service by typing the url in the browser address bar and then entering the required credentials. Could anybody shed any light please? Thanks, Shimin AGSCredential* cred = [[AGSCredential alloc]initWithUser:@"******" password:@"******"]; NSURL* urlFirePolygon = [NSURL URLWithString:@"https://collector.uat.rfs.nsw.gov.au/arcgisserver/rest/services/External/PROD_ICON/MapServer/3"]; AGSDynamicMapServiceLayer *firePolygonLayer = [AGSDynamicMapServiceLayer dynamicMapServiceLayerWithURL:urlFirePolygon credential:cred]; firePolygonLayer.delegate = self; [self.mapView addMapLayer:firePolygonLayer withName:@"ICON Fire Polygon"]; ICON Fire Polygon Error: Error Domain=org.brautaset.AGSSBJsonParser.ErrorDomain Code=0 "Illegal start of token [<]" UserInfo=0x1bba7e40 {responseString= <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1"> <style> body { font-family: Avenir-Light, Verdana, Geneva, sans-serif; font-weight: 0; font-size: 13px; margin: 0; padding: 0; } h1 { font-size: 16px; color: #38698c; float: left; margin: 13px 0 0; } a { text-decoration: underline; color: #38698c; } #waConfig { margin-top: 36px; } .logoImg { float: left; margin: 0 15px 0 0; } .helpHolder { width: 670px; margin: 0 auto; } .pane { -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px 8px 8px 8px; -moz-box-shadow: 0 0 3px #000; -webkit-box-shadow: 0 0 3px #000; box-shadow: 0 0 3px #000; border: none; background-color: #fff; } .paneTitleBar { background-color: #38698c; background: -moz-linear-gradient(center top, #64a7ce 0%, #38698c 100%); background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#64a7ce), to(#38698c)); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#64a7ce', endColorstr='#38698c'); color: #fff; border: none; height:20px; } .paneContent { border-top: none; background-color: transparent; padding: 4px 38px 20px; } .radioHolder{ padding:0 0 16px 48px; } .configDialog { width: 700px; font-size: 1em z-index: 1001 !important; margin: 0 auto; } .ErrorText { width: 550px; } .logoHolder { background-color: #f7f7f3; -moz-border-radius: 10px 10px 0 0; -webkit-border-radius: 10px 10px 0 0; border-radius: 10px 10px 0 0; background-image: -moz-linear-gradient(center top, #f7f7f3, #e1e1dd); background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#f7f7f3), to(#e1e1dd)); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e7e7e7'); height: 42px; overflow: hidden; padding: 0 10px; } input[type=submit] { border: 1px solid #759dc0; padding: 2px 4px 4px 4px; color: #000000; -moz-border-radius: 4px; border-radius: 4px; -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15); -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15); background-color: #bcd8f4; background-repeat: repeat-x; background-image: -moz-linear-gradient(#ffffff 0px, rgba(255, 255, 255, 0) 3px, rgba(255, 255, 255, 0.75) 100%); background-image: -webkit-linear-gradient(#ffffff 0px, rgba(255, 255, 255, 0) 3px, rgba(255, 255, 255, 0.75) 100%); background-image: -o-linear-gradient(#ffffff 0px, rgba(255, 255, 255, 0) 3px, rgba(255, 255, 255, 0.75) 100%); background-image: linear-gradient(#ffffff 0px, rgba(255, 255, 255, 0) 3px, rgba(255, 255, 255, 0.75) 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#bcd8f4', endColorstr='#ffffff'); cursor: pointer; _background-image: none; float:right; } input[type=submit]:hover { background-color: #86bdf2; color: #000000; -webkit-transition-duration: 0.2s; -moz-transition-duration: 0.2s; transition-duration: 0.2s; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#86bdf2', endColorstr='#ffffff'); } input[type=radio] { cursor: pointer; margin:0 30px 0 0 ; } input[type=checkbox] { cursor: pointer; margin:0 20px 0 0 ; } a.tooltip span { display:none; padding:2px 3px; margin-left:8px; width:300px; } a.tooltip.about:hover span{ margin-left:-320px; width:200px } a.tooltip:hover span { display:inline; position:absolute; text-decoration: none; -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px 8px 8px 8px; -moz-box-shadow: 0 0 3px #000; -webkit-box-shadow: 0 0 3px #000; box-shadow: 0 0 3px #888; border: none; padding: 15px; background:#d6ffbd; color: #444444; margin: 0 0 30px; } .statusTable { -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px 8px 8px 8px; -moz-box-shadow: 0 0 3px #000; -webkit-box-shadow: 0 0 3px #000; box-shadow: 0 0 3px #888; border: none; padding: 15px; background:#d6ffbd; margin: 0 0 30px; color: #444444; width: 587px; } .configTable { width: 640px; } .runAtExample { font-size: 12px; margin: 5px 0; display: block; color: #4B4B4B; } .enableAdminAccessHolder { height: 70px; } .ExampleLabel { font-size: 12px; padding-left: 0; display: block; margin: 5px 0; color: #4B4B4B; } .errorTitle { color:#FF0000; font-size:large; font-family: Arial,Verdana,arial,sans-serif; font-weight:bold; } .errorLabel { font-family: Arial,Verdana,arial,sans-serif; font-size: 15px; }</style> <title> Application Error </title></head> <body> <div class="helpHolder"> <p id="helpLinkElement" class="help"> </p> </div> <div class="configDialog pane"> <div class="logoHolder"> <img alt="Esri Logo" class="logoImg" src="/arcgisserver/webadaptor/images/logo.png" /> <h1>ArcGIS Web Adaptor</h1> </div> <div class="paneTitleBar"></div> <div id="contentHolder" class="paneContent"> <div id="Div2" class="statusTable" style="background: #FFCDCD; padding-top: 5px; margin-top: 14px"> <table> <tr> <td width="50"> <img alt="" src="/arcgisserver/webadaptor/images/error.png" /> </td> <td> <p class="errorLabel"> The 'Proxy-Connection' header must be modified using the appropriate property or method. Parameter name: name </p> </td> </tr> </table> </div> </div> </div> </body> </html> , NSLocalizedDescription=Illegal start of token [<]}
... View more
08-03-2014
09:22 PM
|
0
|
2
|
4344
|
|
POST
|
I found the answer in the Geometry sample. Thanks & Cheers, Shimin
... View more
07-22-2014
11:39 PM
|
0
|
0
|
702
|
|
POST
|
Hi Divesh, Thanks for your prompt response with the correct answer. Sorry I overlooked the AGSGeometryEngine... What is the recommended work flow to obtain the AGSPolyline cutter? Thanks, Shimin
... View more
07-22-2014
04:55 PM
|
0
|
1
|
702
|
|
POST
|
Hi, Is it possible to split a line feature of AGSGraphic or AGSGDBFeature? Thanks, Shimin
... View more
07-22-2014
04:16 PM
|
0
|
3
|
1948
|
|
POST
|
Hi Matt & Michael, I did not get any response in this forum but I had to work around it... My workaround is to write the records into a *.sqlite database when the app is going online and then use the data in the sqlite regardless of online or offline. Here is the code: @property (nonatomic, strong) AGSFeatureSet *quickCodeFeatureSet; When the app is going online, add and query the table feature layers: //Add standalone table layers for (AGSMapServiceTableInfo* info in weakSelf.gdbTask.featureServiceInfo.tableInfos) { NSURL* url = [weakSelf.gdbTask.URL URLByAppendingPathComponent:[NSString stringWithFormat:@"%d",info.tableId]]; AGSFeatureLayer* fl = [AGSFeatureLayer featureServiceLayerWithURL:url mode:AGSFeatureLayerModeOnDemand]; fl.outFields = @[@"*"]; fl.delegate = weakSelf; fl.queryDelegate = weakSelf; fl.editingDelegate = weakSelf; AGSQuery *qry = [AGSQuery query]; qry.outFields = @[@"*"]; //qry.outFields = @[@"Type", @"QuickCode", @"Description", @"ObjectID"]; //qry.outFields = @[@"Type", @"QuickCode", @"Description"]; //qry.where = [NSString stringWithFormat:@"QuickCode in (%@)", @"1,2,3,4,5,6,7,8,9,10,11,12,13,14,15"]; qry.where = @"QuickCode < 10000"; [fl queryFeatures:qry]; [weakSelf.mapView addMapLayer:fl withName:info.name]; [weakSelf logStatus:[NSString stringWithFormat:@"loading: %@", [fl.URL absoluteString]]]; } Note that, to be able to query this standalone table layer, it must be added to the map view otherwise zero features are returned. In the feature layer query delegate write the records to the sqlite #pragma mark - AGSFeatureLayer query delegate methods -(void)featureLayer:(AGSFeatureLayer *)featureLayer operation:(NSOperation *)op didQueryFeaturesWithFeatureSet:(AGSFeatureSet *)featureSet { NSLog(@"%d", featureSet.features.count); self.quickCodeFeatureSet = featureSet; NSLog(@"%d", self.quickCodeFeatureSet.features.count); [self populateQuickCodeTable]; } -(void)populateQuickCodeTable { DBManager *db = [[DBManager alloc]init]; [db clearQuickCode:@"SPDQuickCode"]; for (AGSGraphic *feature in self.quickCodeFeatureSet.features) { NSString *type = [feature safeAttributeForKey:@"Type"]; int code = [((NSNumber *)[feature safeAttributeForKey:@"QuickCode"])intValue]; NSString *description = [feature safeAttributeForKey:@"Description"]; [db insertQuickCode:@"SPDQuickCode" QuickCodeType:type QuickCode:code Description:description]; } [db closeDatabase]; } The above workaround is working fine for my purposes. For your information: I also tried to write the features to the local geodatabase right after the database is created, but I can't use this solution. The reason is below... //Add local feature/table layers for (AGSFeatureTable* fTable in geodatabase.featureTables) { if ([fTable hasGeometry]) { AGSFeatureTableLayer *ftl = [[AGSFeatureTableLayer alloc]initWithFeatureTable:fTable]; ftl.delegate = self; [self.mapView addMapLayer:ftl]; } /* else { if([fTable.tableName isEqualToString:@"SPDQuickCode"]) { AGSGDBFeatureServiceTable *fsTable = (AGSGDBFeatureServiceTable *)fTable; for (AGSGraphic *feature in self.quickCodeFeatureSet.features) { AGSGDBFeature *gdbFeature = [fsTable featureWithTemplate:nil]; [gdbFeature setAttribute:[feature safeAttributeForKey:@"Type"] forKey:@"Type"]; [gdbFeature setAttribute:[feature safeAttributeForKey:@"QuickCode"] forKey:@"QuickCode"]; [gdbFeature setAttribute:[feature safeAttributeForKey:@"Description"] forKey:@"Description"]; NSError *error; [fsTable saveFeature:gdbFeature error:&error]; if(error) { NSLog(@"%@", error.localizedDescription); } } } } //the commented code is working and saves the quickcode records to the local table //but the problem is that the database records the edits and the edits flags can't //be removed and as a result when sync the data is synced back to the corporate database and generates duplicates. */ } Hope it helps. Cheers, Shimin
... View more
07-10-2014
04:43 PM
|
0
|
1
|
1069
|
|
POST
|
Divesh, Thank you very very much. Your script is exactly what I'm looking for and I successfully exported my stranded mobile geodatabase to a file geodatabase including all the feature classes, attachments and data. That is EXCELLENT!!! Cheers, Shimin
... View more
06-26-2014
05:02 PM
|
0
|
0
|
960
|
|
POST
|
The app has multiple geodatabases and the one a user selects to work on is registered and synced. I tried syncing without registering and the syncGeodatabase method threw the same exception. I think we figured out why the replica has gone missing on server. There were issues with our arcgis server and feature services and we had been republishing or overwriting the feature services or even might have rebuilt/reinstalled the arcgis server. The replica might have been taken earlier than that... I'm seeking alternative ways of getting data out of the mobile geodatabase if the geodatabase can't be synced for any reason. In ArcMap a mobile geodatabase can be created via Share As Runtime content... It would be good if the other way around can be done... Thanks, Shimin
... View more
06-23-2014
04:32 PM
|
0
|
0
|
960
|
|
POST
|
Unfortunately, this is not possible at this time. If you do not include existing attachments while generating a sync-enabled geodatabse, you cannot later add & sync new attachments. I encourage you to log an enhancement request for this functionality if it is critical for your workflow. You can contact Esri Support, or use http://ideas.arcgis.com/ Thanks Divesh for your clarification. I'll lodge an enhancement request. Cheers, Shimin
... View more
06-23-2014
03:28 PM
|
0
|
0
|
1392
|
|
POST
|
Thanks for the reply. Yes, I have seen that page. I found and fixed my issue yesterday. The Server for ArcGIS log file showed an error stating that there was an invalid column data type in the table. As it turns out, the process that creates the SQLite geodatabase does not like fields of type nvarchar(max) (SQL Server). Also, of note for anyone else, if you initialize the AGSGDBGenerateParameters object with the feature service info it does not automatically include tables. I had to override the layerIDs property for the parameters to add both the layer IDs and table IDs. Hi, I have a few standalone lookup tables in my feature service. When generating a local geodatabase, I'm able to download these tables into the local geodatabase based on the advice above that adds both the layerIDs and tableIDs in the feature service. However, the tables downloaded in the local geodatabase are empty... I need to download the data in the tables as well. Is it possible to do this? Thanks, Shimin
... View more
06-22-2014
11:59 PM
|
0
|
4
|
1069
|
|
POST
|
Hi All, When registering an offline geodatabase I received this error: error registering the offline geodatabase: Error Domain=NSCocoaErrorDomain Code=404 "Unable to complete operation." UserInfo=0x1643eb70 {NSLocalizedFailureReason=Replica with GUID ({69487203-7E56-42F5-AEFE-05BF07B6BBD8}) does not exists on the server., NSLocalizedDescription=Unable to complete operation., responseJSON={ error = { code = 404; details = ( "Replica with GUID ({69487203-7E56-42F5-AEFE-05BF07B6BBD8}) does not exists on the server." ); message = "Unable to complete operation."; }; }, NSURL=http://203.8.108.21/arcgis/rest/services/SPD/SiteBasedPlanning/FeatureServer/createReplica} I checked the feature service/arcgis server and the replica with that GUID did not indeed exist. I have two questions here: 1. How could the replica has gone missing on server? What measures should I take to avoid this happening again? 2. Besides register and sync offline geodatabase in code, is there any other way to get the data out of the offline geodatabase? Field data collection is very costly and we can't afford to do it again. Thanks a lot for any help. Shimin
... View more
06-19-2014
04:06 PM
|
0
|
4
|
4160
|
| 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
|