<AGSMapViewLayerDelegate> <AGSMapViewCalloutDelegate> < AGSMapViewTouchDelegate>
// Set the Layer Delegate self.mapView.layerDelegate = self; // Set the Callout Delegate self.mapView.calloutDelegate = self; // Set the Touch Delegate self.mapView.touchDelegate = self; //-----------------Create and Add Feature Layer------------------------- NSURL* myUrl = [NSURL URLWithString: @<place feature service URL here>]; AGSFeatureLayer* myLayer = [AGSFeatureLayer featureServiceLayerWithURL: myUrl mode: AGSFeatureLayerModeOnDemand]; // Add My Dynamic Feature Layer to Map View [self.mapView addMapLayer:myLayer withName:@My Layer]; // Create Info Template Delegate for My Dynamic Feature Layer AGSCalloutTemplate* myTemplate = [[AGSCalloutTemplate alloc] init] ; myTemplate.titleTemplate = @${Field Value for Title Text}; myTemplate.detailTemplate = @${Field Value for Detail Text}; // Assign Template to My Dynamic Feature Layer myLayer.infoTemplateDelegate = myTemplate;
self.myfeatureLayer.outFields = [NSArray arrayWithObject:@*];
In addition to those steps, it is crucial to add this line of code when you create the feature layer, in order to get all the outfields available:self.myfeatureLayer.outFields = [NSArray arrayWithObject:@*];
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.