AnsweredAssumed Answered

FeatureLayer from ShapeFile, change Fill-Color

Question asked by dni on Feb 3, 2015
Latest reply on Feb 3, 2015 by dni

Hi,

 

I am creating a FeatureLayer from a Shapefile on my map with the following code at application startup :

public async void LoadShapefileAsync(string path)

{

    try

    {

        ShapefileTable shapefile = await ShapefileTable.OpenAsync(path);

        _spatialReference = shapefile.SpatialReference;

        GisMap.SpatialReference = _spatialReference;

 

        FeatureLayer flayer = new FeatureLayer(shapefile)

        {

            ID = shapefile.Name,

            DisplayName = path,

        };

        GisMap.Layers.Add(flayer);

    }

    catch (Exception ex)

    {

        throw new ArgumentException("Feature-Layer aus Shapedatei konnte nicht erstellt werden: " + ex.Message);

    }

}

 

The result on my map is a grey filled polygon with a black solid outline.

How can I change the fill color and outline style for the polygon(s) on the FeatureLayer?

 

Thanks in advance! :-)

Outcomes