Feature layer (shapefile)

View inWPFUWPFormsiOSAndroid
View on GitHub

Open a shapefile stored on the device and display it as a feature layer with default symbology.

Image of feature layer shapefile

Use case

Shapefiles store location, shape and attributes of geospatial vector data. Shapefiles can be loaded directly into ArcGIS Runtime.

How to use the sample

Pan and zoom around the map to observe the data from the shapefile.

How it works

  1. Create a ShapefileFeatureTable passing in the URL of a shapefile.
  2. Create a FeatureLayer using the shapefile feature table.
  3. Add the layer to the map's operation layers.

Relevant API

  • FeatureLayer
  • ShapefileFeatureTable

Offline data

This sample downloads the following items from ArcGIS Online automatically:

  • Public Art Shapefile - Shapefiles that cover Aurora Colorado: Public art (points), Bike trails (lines), and Subdivisions (polygons).


layers, shapefile, shp, vector

Sample Code

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
    <esriUI:MapView x:Name="MyMapView"/>