Skip to content

Commit

Permalink
fix(bulk geocoding): clean up code in bulk geocoding
Browse files Browse the repository at this point in the history
AFFECTS PACKAGES:
@esri/arcgis-rest-geocoding

ISSUES CLOSED: #630
  • Loading branch information
gavinr-maps committed Oct 30, 2019
1 parent 5870086 commit 5e28028
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/arcgis-rest-geocoding/src/bulk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,11 @@ export function bulkGeocode(
};

options.params.addresses = {
records: []
records: requestOptions.addresses.map(address => {
return { attributes: address };
})
};

requestOptions.addresses.forEach(address => {
options.params.addresses.records.push({ attributes: address });
});

// the SAS service doesnt support anonymous requests
if (
!requestOptions.authentication &&
Expand Down

0 comments on commit 5e28028

Please sign in to comment.