Network Analysis service area, cutoff polygon layer

2374
5
Jump to solution
10-15-2015 02:10 AM
Highlighted
New Contributor II

Hello,

I am trying to do a service area using my own solver.

My problem is that when I create a polygon with different cutoff in a polygon layer I can't find how to make the same kind of layer in service area of Network Analysis with one color for each polygon in the layer.

I'm creating my polygon like this :

                    var newPolygon = PolygonBuilder.CreatePolygon(ringCoordinate, spatialref);

                    createOperation.Create(polygonFeatureLayer, newPolygon);

                    return createOperation.ExecuteAsync();

Here is my current result (2 polygons in the polygons layer) :

serviceAreaFail.png

And here the result of a service area analysis that I wish to have (3 polygons in the polygons layer) :

serviceArea.png

Note the difference with the polygons layer.

Thank you for your help.

Edit :

The polygons created in the first image are created using an add-in that I made with the SDK .Net and it use the part of code that I provided.

The polygons in the second image are created using the analysis button of Network Analysis.

What I'm looking for is the function in the SDK .Net that allow me to give different color for each polygon in the polygons layer.

It seems that my question was misunderstood and I hope that it is now more understandable.

Tags (2)
Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Esri Contributor

Loic,

I believe you are looking for a unique value renderer approach based on an attribute (which is what the network analyst result layer uses).

Please take a look at the unique value renderer code snippet at

https://github.com/esri/arcgis-pro-sdk/wiki/ProSnippets-MapAuthoring.

View solution in original post

5 Replies
Highlighted
MVP Esteemed Contributor

A service area will be per point, your symbol says <all other cutoffs> change that symbol color to transparent and see if other colors emerge and check its table to see if there are other values,

Reply
0 Kudos
Highlighted
New Contributor II

otherfail.png

As you can see there are 2 polygons in the layer and even after changing the transparency there are no other color. I have edited my question to provide some accuracy about what I want to do.

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

It seems that those polygons are underneath maybe try

UpdateUnion​ or one of the tools from the overlay toolset

Reply
0 Kudos
Highlighted
Esri Contributor

Loic,

I believe you are looking for a unique value renderer approach based on an attribute (which is what the network analyst result layer uses).

Please take a look at the unique value renderer code snippet at

https://github.com/esri/arcgis-pro-sdk/wiki/ProSnippets-MapAuthoring.

View solution in original post

Highlighted
New Contributor II

Thank you, it is indeed what I was looking for.

More precisely, after your answer and some research, it was the CreateRenderer methode of FeatureLayer class that I was looking for.