Bonjour,
Nouveau dans la communauté esri, je travaille pour un bureau d'urbanisme qui utilise les outils d'esri.
Je développe des applications pour iPad et pour les besoins d'un projet, je me suis mis a regarder le sdk arcgis pour iOS.
Pas trop de soucis jusqu'à présent mais deux questions :
• Est-il possible de modifier la couleur ou le contour d'un polygone lorsque l'on fait un callout dessus ? (j'arrive bien a afficher les infos lié à ce polygone mais je ne trouve rien pour lui changer la couleur lorsqu'il est sélectionné)
• Est-il possible de copier les données d'une table dans un NSArray ?
Cordialement
Stéphane Sotlar
Stephane,
Hope I understand your questions correctly.
To answer your first question, in order to customize the callout, including the outline color, you'll have to crate a custom callout. We have a good sameple here arcgis-runtime-samples-ios/CustomCalloutSample at master · Esri/arcgis-runtime-samples-ios · GitHub
To answer your second question, a table contains a collection of AGSGraphics, you'll need to loop and copy the values into an NSMutableArray.
Hope all this helps, let us know if you need anything else.
Hello,
Thanks for the answer.
For the first question, it's ok. I use the fonction :
- (void)mapView:(AGSMapView *)mapView didClickAtPoint:(CGPoint)screen mapPoint:(AGSPoint *)mappoint features:(NSDictionary *)features{
[self.localFeatureTableLayer clearSelection];
if (features){
for (AGSGDBFeature *feature in [features valueForKey:@"Local Data Bati"]) {
[self.localFeatureTableLayer setSelected:YES forFeature:feature];
NSLog(@"Feature selectionner BATI Local");
}
}
}
For the second question, i have a problem.
I use this code for obtain the number of fields and the number of lines in the table but i don't understand how to obtain the data line.
NSLog(@"%lu collones", (unsigned long)featureServiceTable.fields.count);
NSLog(@"%lu", (unsigned long)localFeatureTableLayer.table.featureCount);
NSLog(@" Traitement base");
arrayPrincipal = [[NSMutableArray alloc] init];
int i2 = 1;
for (int i = 0; i < (localFeatureTableLayer.table.featureCount); i++) {
NSLog(@" Traitement fiche : %i", i);
//AGSGraphic* graphic = [localFeatureTableLayer select:i2];
//featureForArray = [localFeatureTableLayer select:i2];
//NSLog(@"%@", graphic);
i2 ++;
}
Stephane