AGSFeatureLayer does not redraw or respond to touches

3334
1
03-27-2014 06:06 AM
by Anonymous User
Not applicable
Original User: artomlin

Hello all. I'm having some trouble loading AGSFeatureLayers.
I start out by adding a TPK, then two AGSFeatureLayers.

    self.mapView.allowCallout = YES;
    self.mapView.callout.delegate = self;
    self.mapView.touchDelegate = self;
    self.mapView.layerDelegate = self;

    NSString *tilePackagePath = [[NSBundle mainBundle] pathForResource:@"my_tile_package" ofType:@"tpk"];
    
    AGSLocalTiledLayer *localTiledLayer = [AGSLocalTiledLayer localTiledLayerWithPath:tilePackagePath];
    if(localTiledLayer != nil)
    {
        NSLog(@"Loading TPK...");
        localTiledLayer.delegate = self;
        [self.mapView addMapLayer:localTiledLayer withName:@"Tiled_BG"];
    }
    else
    {
        NSLog(@"TPK does not exist");
    }

    [self.mapView addMapLayer:self.featureLayer1 withName:@"Features1"];
    [self.mapView addMapLayer:self.featureLayer2 withName:@"Features2"];
    
    self.featureLayer1.allowCallout = YES;
    self.featureLayer1.calloutDelegate = self;
    self.featureLayer1.delegate = self;
    
    self.featureLayer2.allowCallout = YES;
    self.featureLayer2.calloutDelegate = self;
    self.featureLayer2.delegate = self;



The TPK and AGSFeatureLayers load just fine, but there are two big issues.

First, the AGSFeatureLayers are not visible initially. As soon as you pan the map, they are redrawn and become visible. Zooming does not make the feature layers redraw, unless that zoom action reaches the max or min zoom of the TPK. In the following screenshots, you can see the effect this has. The application was launched, and the map was dragged to make the featureLayers visible. The map was then zoomed, but this action alone does not cause the AGSFeatureLayers to redraw (first screenshot). Then the map is panned, and the layers redraw (second screenshot).
[ATTACH=CONFIG]32551[/ATTACH]
[ATTACH=CONFIG]32552[/ATTACH]

Secondly, the AGSFeatureLayers do not respond to callout delegate methods. The map itself responds to AGSMapViewTouchDelegate and other delegate methods, but I can't get any response from the AGSFeatureLayers.

Any thoughts or ideas? I'm stumped.
Thanks in advance!
0 Kudos
1 Reply
by Anonymous User
Not applicable
Original User: artomlin

FYI: Using ArcGIS Runtime SDK for iOS -- 10.2
0 Kudos