Open a shapefile stored on the device and display it as a feature layer with default symbology.
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
- Create a
ShapefileFeatureTable
passing in the URL of a shapefile. - Create a
FeatureLayer
using the shapefile feature table. - 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).
Tags
layers, shapefile, shp, vector
Sample Code
<UserControl
x:Class="ArcGIS.UWP.Samples.FeatureLayerShapefile.FeatureLayerShapefile"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:esriUI="using:Esri.ArcGISRuntime.UI.Controls" >
<esriUI:MapView x:Name="MyMapView" />
</UserControl>