Select to view content in your preferred language

Zip Code map of US

507
0
10-26-2020 08:32 AM
JamesRyseff
New Contributor

Hi,

         I'm trying to create an ArcGIS Runtime app that uses a map of the United States with all its zip codes as its base map. I was thinking I should use the United States Zip Code Boundaries 2018 as a FeatureLayer to do that. I have the following code:

TokenCredential creds = await AuthenticationManager.Current.GenerateCredentialAsync(

  new Uri("https://www.arcgis.com/sharing/rest"),

  username,

  password,  TokenAuthenticationType = TokenAuthenticationType.ArcGISToken);

FeatureLayer zipCodesLayer = new FeatureLayer(new Uri(

"https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/USA_Boundaries_2018/FeatureServer"), userCredentials);

await zipCodesLayer.LoadAsync();

However, this fails at the last line of code with the exception "Attempted to use invalid JSON: Name property is missing". Is this zip code map not intended to be a FeatureLayer? If not, what is it exactly?

0 Kudos
0 Replies