POST
|
Question update: Which is the correct syntax to set a definition expression for "Identify" ? Resolved:
NSString* defString = @"NAME='Mike'";
AGSLayerDefinition* layerDef = [AGSLayerDefinition layerDefinitionWithLayerId:0 definition:defString];
identifyParams.layerDefinitions = [NSArray arrayWithObject: layerDef];
I have a Map and a feature layer. In my feature layer there are a lot of features created by different people. There is a field "NAME" with the feature creator's name. So, to show the features created only by, let's say "Mike" I am trying to use the following code:
NSURL *featLURL = [NSURL URLWithString:@"......"];
self.featureLayer = [AGSFeatureLayer featureServiceLayerWithURL: featLURL mode: AGSFeatureLayerModeOnDemand];
self.featureLayer.outFields = [NSArray arrayWithObject:@"*"];
[self.featureLayer setDefinitionExpression:@"NAME=???Mike???"];
[self.mapView addMapLayer:self.featureLayer withName:@"featurez"];
self.featureLayer.editingDelegate = self;
Doesn't work. Every feature just disappears from the map. (but they still can be identified) Any advices? Edit 1: it does work like this: NSString* defString = @"OBJECTID='1'"; But still doesn't work with strings. Edit 2: Mkkkay, after restarting the service everything started working. Strange. Question update: Which is the correct syntax to set a definition expression for "Identify" ?
... View more
04-14-2011
06:15 AM
|
0
|
1
|
3180
|
POST
|
My solution: Feel free to use.
NSArray *fieldz = [featureLayer fields];
NSString *neededField = @"FIELD_NAME";
for (int i = 0; i<[fieldz count]; i++)
{
AGSField *currentField = [fieldz objectAtIndex:i];
NSString *fieldName = currentField.name;
if ([fieldName isEqualToString:neededField])
{
NSArray *domains = [[currentField domain] codedValues];
if (domains)
{
NSLog(@"%@", currentField.name);
for (int a = 0; a < [domains count]; a++)
{
NSLog(@"NAME = %@ ; CODE = %@", [[domains objectAtIndex:a] name], [[domains objectAtIndex:a] code]);
}
}
NSLog(@"domain test complete");
}
}
... View more
03-29-2011
07:05 AM
|
1
|
0
|
229
|
POST
|
I didn't get the question. What do you need exactly? And post your code, please.
... View more
03-25-2011
04:44 AM
|
0
|
0
|
324
|
POST
|
How to return a list of allowed values (domain) for a specific field (Field key) of a specific object (ID)? For instance, I have an object "ObjectA" on the map with ID = 12345. It has a field: "Married?" and it has only 2 possible values: "Yes" and "No". So, how to return a list of possible values in the code? Thanks in advance.
... View more
03-25-2011
04:15 AM
|
1
|
2
|
655
|
POST
|
How can I get all service's fields (FIELDS listed on a webserver site) without performing a direct identify?... Which is the query / code? :S [[dynLayer1 mapServiceInfo] layerInfos]; -> always empty. Ok, using this code the service info is no longer empty. But I still can't return the whole list of fields. Maximum I can get is the name of the service layer. NSError *error = nil; AGSMapServiceInfo *serviceInfo = [AGSMapServiceInfo mapServiceInfoWithURL:layer1url error:&error];
... View more
03-07-2011
12:56 AM
|
0
|
0
|
502
|
POST
|
ok resolved: You also need to change the start, fixed and maximum values of heap: Solution: Locate eclipse.ini, edit 4 values:
-startup
....
--launcher.XXMaxPermSize
512m
.....
-XX:MaxPermSize=512m
-Xms512m
-Xmx1024m
.....
... View more
02-23-2011
01:29 AM
|
0
|
0
|
333
|
POST
|
The same problem on Max Os X snow Leopard: [2011-02-23 10:27:02 - Dex Loader] Unable to execute dex: Java heap space [2011-02-23 10:27:02 - ArcGIS_1] Conversion to Dalvik format failed: Unable to execute dex: Java heap space
... View more
02-23-2011
12:29 AM
|
0
|
0
|
333
|
POST
|
After installing Android Eclipse Plugins (SDK), eclipse just stopped working. - Heap limit exceeded - GC overhead limit exceeded - Out of memory errors. Can't even create a project. Windows 7 x64. Eclipse 3.6.1 Helios. Without ArcGIS SDK eclipse works just fine. Fix it please :S
... View more
02-22-2011
08:32 AM
|
0
|
4
|
2720
|
Title | Kudos | Posted |
---|---|---|
1 | 03-29-2011 07:05 AM | |
1 | 03-25-2011 04:15 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|