Display a shapefile with custom symbology.
While feature layers come with default symbology, you can apply custom styling to ensure that the content is visible and usable in the context of a specific map.
- Create a
ShapefileFeatureTable
, providing the path to a shapefile. - Create a
FeatureLayer
and associate it with theShapeFileFeatureTable
. - Create a
SimpleRenderer
to override the default symbology. The simple renderer takes a symbol and applies that to all features in a layer. - Apply the renderer to the
FeatureLayer
by setting the renderer.
- FeatureLayer
- ShapefileFeatureTable
- SimpleFillSymbol
- SimpleLineSymbol
- SimpleRenderer
This sample downloads the following items from ArcGIS Online automatically:
- Aurora_CO_shp.zip - Shapefiles that cover Aurora Colorado: Public art (points), Bike trails (lines), and Subdivisions (polygons).
This sample displays a shapefile containing subdivisions in Aurora, CO.
package, shape file, shapefile, symbology, visualization