Skip to content

Commit

Permalink
add outFields to candidate request parameter bundles
Browse files Browse the repository at this point in the history
  • Loading branch information
rfchmu committed Jul 16, 2024
1 parent 31e2302 commit cf4a6e6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ public class AddressCandidateParameters : StorageParameters, IClientCredentialsP
/// </summary>
public string MagicKey { get; set; }

/// <summary>
/// Comma-separated list of attribute fields to include in the response. To return all fields, specify the wildcard '*' as the value of this parameter.
/// </summary>
public string OutFields { get; set; } = "Match_addr,Addr_type";

/// <inheritdoc/>
public string ClientId { get; set; }

Expand Down
5 changes: 5 additions & 0 deletions src/Geo.ArcGIS/Models/Parameters/PlaceCandidateParameters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ public class PlaceCandidateParameters : StorageParameters, IClientCredentialsPar
/// </summary>
public LocationType LocationType { get; set; } = LocationType.Rooftop;

/// <summary>
/// Comma-separated list of attribute fields to include in the response. To return all fields, specify the wildcard '*' as the value of this parameter.
/// </summary>
public string OutFields { get; set; } = "Place_addr,PlaceName";

/// <inheritdoc/>
public string ClientId { get; set; }

Expand Down
4 changes: 2 additions & 2 deletions src/Geo.ArcGIS/Services/ArcGISGeocoding.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ internal async Task<Uri> BuildAddressCandidateRequest(AddressCandidateParameters
var uriBuilder = new UriBuilder(CandidatesUri);
var query = QueryString.Empty;
query = query.Add("f", "json");
query = query.Add("outFields", "Match_addr,Addr_type");
query = query.Add("outFields", parameters.OutFields);

query = query.Add("singleLine", parameters.SingleLineAddress);

Expand Down Expand Up @@ -199,7 +199,7 @@ internal async Task<Uri> BuildPlaceCandidateRequest(PlaceCandidateParameters par
var uriBuilder = new UriBuilder(CandidatesUri);
var query = QueryString.Empty;
query = query.Add("f", "json");
query = query.Add("outFields", "Place_addr,PlaceName");
query = query.Add("outFields", parameters.OutFields);

if (!string.IsNullOrWhiteSpace(parameters.Address))
{
Expand Down

0 comments on commit cf4a6e6

Please sign in to comment.