jgiesler

Problems with AGSGraphicsLayer

Discussion created by jgiesler on Sep 25, 2013
Latest reply on Sep 27, 2013 by jgiesler
Hello everyone,
I am having trouble adding and populating an AGSGraphicsLayer.  Through my log I know there are features in the Graphics Layer and that there is a symbol attached to each graphic. My problem is that the Graphics Layer doesn't display.  I have attached my code for both creating and populating the Graphics Layer.  Any help would be fantastic, I can't figure out what I am doing wrong
Cheers,
Jeff

Creating
-(void) didOpenWebMap:(AGSWebMap *)webMap intoMapView:(AGSMapView *)mapView
{
// Add Graphic Layer
self.NonRelatedPermitsLayer = [AGSGraphicsLayergraphicsLayer];
        [self.mapViewaddMapLayer:self.NonRelatedPermitsLayerwithName:@"Non Related Permit Sketch"];
}

Populating
-(void) PrintintOrientationChange
{
//Create the AGSSimpleFillSymbol used for the fill
   AGSSimpleFillSymbol* myFillSymbol = [AGSSimpleFillSymbolsimpleFillSymbol];
    myFillSymbol.color = [UIColor colorWithRed:0.7 green:0.1 blue:0.1 alpha:0.5];

//Create the AGSSimpleLineSymbol used for the outline
   AGSSimpleLineSymbol* myOutlineSymbol = [AGSSimpleLineSymbolsimpleLineSymbol];
    myOutlineSymbol.color = [UIColor redColor];
    myOutlineSymbol.width = 50;

//set the outline property to myOutlineSymbol
    myFillSymbol.outline = myOutlineSymbol;


for (AGSGraphic *graphic inAppDelagate.NonRelatedFeatureSet.features)
    {
       //set the graphics???s symbol to fillSymbol
       graphic.symbol = myFillSymbol;
       //add the graphic to the layer
        [self.NonRelatedPermitsLayer addGraphic:graphic];
    }
}


Outcomes