I would like to report a regression bug in arcgis sdk v5 - i hope this is the right place to do this...
I am using the method locationToAddress with the signature:
locationToAddress (url: string, params: LocationToAddressParametersProperties, requestOptions?: RequestOptions): Promise<AddressCandidate>
docs: https://developers.arcgis.com/javascript/latest/references/core/rest/locator/#locationToAddress
I want to specifiy the featureTypes to filter the features i get back from the api.
It should work based on the requestOptions query field, but the value is not added as an url param. Instead i need to use the following hack to make it work:
const params = {
location: mapPoint,
// HACK to make it work
featureTypes: ['point-address', 'locality'],
};
const reqOptions = {
query: {
// BUG: does not work anymore
featureTypes: 'PointAddress,Locality',
},
};
locationToAddress(REVERSEGEOCODE_SERVICEURL, params, reqOptions)