|
POST
|
After some direct messaging back and forth we found a few issues: The MapView was using Map Services rather than Feature Services for the layers in question. mapView:didClick will not return features for a Map Service, so the query is indeed required. Rather than using a query, an AGSIdentifyTask was more appropriate. The code had some strange leftover SpatialReference stuff in there. Tidying that up helped. There was no need for the Sketch Layer. Making those changes and tightening up the search envelope resolved the issues.
... View more
04-28-2016
09:17 AM
|
0
|
0
|
2393
|
|
POST
|
Hi, A .geodatabase file must come either from an online feature service (from ArcGIS Online or from ArcGIS Server 10) or side-loaded from ArcGIS for Desktop's Create Runtime Content tool. Even an "empty" .geodatabase file (one that contains no data) must have a schema with a well defined set of tables already created, so you don't create an offline .geodatabase by hand. For more information and to understand the various workflows, I highly recommend checking out these two videos from the 2015 Developer Summit. Part I and Part II of Building Offline Apps with the ArcGIS Runtime SDK. For documentation, see "Allow offline editing" here to learn how to enable support for sync in an ArcGIS Online Feature Service and see here for creating a .geodatabase file to side-load onto your device. You can see if your Feature Service has Sync enabled by looking at the REST endpoint. A sync-enabled feature service will have 3 specific REST endpoints listed at the bottom of the service's HTML page: "Create Replica", "Synchronize Replica" and "Unregister Replica". https://gis.nexgenam.com/ArcGIS/rest/services/SLP/MapServer does not have these listed and so is not enabled for sync. Note, also, it needs to be a Feature Service, not a Map Service. Your ArcGIS Server Admin might be able to publish a matching Feature Service with Sync Enabled for you for the above service if that's what you want. Lastly, your code does not look like iOS code. Did you mean to post this in the .Net space? Regardless, all the above remains true. Hope this helps, Nick.
... View more
04-12-2016
09:58 AM
|
1
|
0
|
818
|
|
POST
|
Ok. Here's what I would do. AGSGeometryEngine will be your friend here. Just go through the graphics parameter (although that delegate method was deprecated and you should use the features equivalent if you're using the 10.2.x SDK) to find the entry for the layer you're interested in, then go over the features returned for that layer and use AGSGeometryEngine.distanceFromGeometry:toGeometry to pick the closest geometry to the map point where the user tapped. Note that since your layer is on the map, the results will come back in the didClickAtPoint delegate call in the features parameter, as mentioned by Shimin Cai above. You do not need to query the remote layer again since your data is already on the map on the device. Querying again might be doing what you want but it's an extra network request.
... View more
04-11-2016
02:30 PM
|
0
|
0
|
2393
|
|
POST
|
Hey Brian, Here's what I was able to dig up for you: You will be able to change the color at beta 2 although a transparent one will probably not work because of the way OpenGL renders. Do you have a specific use-case? The Runtime uses a CAEGLView the context is kept private. Again, what's the use case you're looking at? The map can indeed have no basemap. I'd be interested to learn a little more about what you're trying to do that you want the transparency and the OpenGL context. Hope this helps. Nick.
... View more
03-18-2016
11:00 AM
|
0
|
0
|
1753
|
|
POST
|
Actually, gdbFeature.table.tableName doesn't have to be the same as the layer name. Instead, try this: -(void)mapView:(AGSMapView *)mapView didClickAtPoint:(CGPoint)screen mapPoint:(AGSPoint *)mappoint features:(NSDictionary *)features { for (NSString *layerName in features.allKeys) { AGSLayer *layer = [mapView mapLayerForName:layerName]; for (id<AGSFeature> feature in features[layerName]) { NSLog(@"Feature %@ belongs to layer %@ (named '%@').", feature, layer, layerName); } } } You get the layer from the map based off the layer name that's passed in its the features dictionary. If you want, you can then detect that this is an AGSFeatureTableLayer and get the table. As you mentioned, the same table can drive multiple layers, but each layer can only have one source table. Hope this helps, Nick.
... View more
02-18-2016
11:21 AM
|
1
|
0
|
1719
|
|
POST
|
Hi, You could take a look at the Sketch Graphics Layer (and its reference documentation). For text, you would probably want to look at AGSTextSymbol, AGSGraphic, and AGSPoint. See also this Sketch Layer Sample on GitHub. And although this sample is for the OS X SDK, the principles are much the same. That page also includes a link to this download page for the Samples app (look in the app under "Building Maps --> Sketch Layer"). Hope that gives you some answers. Cheers, Nick.
... View more
01-20-2016
06:40 AM
|
0
|
0
|
1477
|
|
POST
|
Try implementing the AGSLayerDelegate protocol and checking the layerDidLoad: and layer:didFailToLoadWithError: methods. Something like: @interface MyClass () <..., AGSLayerDelegate> // Include AGSLayerDelegate in your protocols list
- (void)viewDidLoad {
AGSCredential* cred = [[AGSCredential alloc] initWithUser:MAP_UNAME password:MAP_PWD];
_baseMapLayer = [AGSTiledMapServiceLayer tiledMapServiceLayerWithURL:[NSURL URLWithString:BASE_MAP_URL_STRING] credential:cred];
_baseMapLayer.delegate = self;
[self.mapView insertMapLayer:_baseMapLayer withName:@"Base" atIndex:0];
self.mapView.layerDelegate = self;
}
- (void)layerDidLoad:(AGSLayer *)layer {
NSLog(@"Layer %@ loaded OK", layer.name);
}
- (void)layer:(AGSLayer *)layer didFailToLoadWithError:(NSError *)error {
NSLog(@"Failed to load layer: %@", error.localizedDescription);
} That should give you a log of why the layer is failing to load (which will prevent the map loading).
... View more
01-20-2016
05:36 AM
|
0
|
2
|
1874
|
|
POST
|
You should check the contents of the error object after line 15. It could give you an indication of why the geodatabase did not open. But note that you should just be able to use geodatabaseWithName:error: since you're distributing it with the bundle (read only).
... View more
11-10-2015
05:50 AM
|
0
|
0
|
819
|
|
POST
|
It looks like the inspectionLayer will not have had a chance to reach out to the REST endpoint to interrogate whether it can handle edits yet or not. The inspectionLayer.loaded property will be false, and you can't use the layer until it's true. Either instantiate the AGSFeatureLayer earlier in your app (perhaps on viewDidLoad) and store it as a property, or else set its delegate property and wait to receive the AGSLayerDelegate::layerDidLoad message before inspecting the properties or saving the feature. I recommend the former. It's a lightweight object and fine to keep around like that. As some background: To avoid blocking the main thread, the action of reaching out to the REST endpoint is queued up and requires the run loop to free up before the round-trip HTTP request happens. This won't happen anywhere between lines 2 and 24 in your sample (the "AGSFeatureLayer::loaded" property will be false). This is true of all components in the runtime that make potentially lengthy URL requests (tasks, layers, portals, etc.).
... View more
09-03-2015
05:55 AM
|
0
|
1
|
1089
|
|
POST
|
Hey Rob, FYI: definitionExpression was added to AGSFeatureTableLayer in 10.2.5 of the ArcGIS Runtime SDK for iOS. Release notes for 10.2.5—ArcGIS Runtime SDK for iOS Cheers, Nick.
... View more
09-02-2015
07:10 AM
|
2
|
1
|
2122
|
|
POST
|
Hey Armand van der Zwan, Did my reply above fix your problem? If so, could you mark it as answered so others can find this please? Cheers! Nick.
... View more
08-20-2015
05:36 AM
|
0
|
0
|
524
|
|
POST
|
Hey Armand van der Zwan, Take a look at lastChangeFromInteraction on AGSMapView (it's inherited from AGSMapViewBase). When you receive the AGSMapViewDidEndPanningNotification or AGSMapViewDidEndZoomingNotification notification, check that and it should tell you what you want. Hope that helps, Nick.
... View more
08-13-2015
09:14 AM
|
1
|
0
|
524
|
|
POST
|
Hey Joshua, That's great. I just tested this and yeah, my apps are working again in Beta 4. Note that in the app I'm working on I had to modify my info.plist to allow arbitrary loads for the appropriate target(s): (For more details, see Networking with NSURLSession - WWDC 2015 - Videos - Apple Developer) That's way too broad, but I just wanted get moving again Thanks for posting the update! Nick.
... View more
07-21-2015
03:32 PM
|
0
|
1
|
2285
|
|
POST
|
Good to know. I'll pass that on to the team, thanks.
... View more
07-20-2015
01:54 PM
|
0
|
0
|
2285
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 2 weeks ago | |
| 4 | 3 weeks ago | |
| 1 | 01-29-2026 09:39 AM | |
| 1 | 12-17-2025 10:12 AM | |
| 1 | 11-05-2025 10:52 AM |