Select to view content in your preferred language

locationToAddress argument requestOptions query not honored in @arcgis/core@5

442
6
Jump to solution
03-18-2026 05:14 AM
tmerz-conet
Emerging Contributor

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)
0 Kudos
1 Solution

Accepted Solutions
Noah-Sager
Esri Regular Contributor

Thanks @tmerz-conet, this looks valid. I'm not sure that this is a regression, as I feel like we have the same issue at 4.34. However, your workaround looks good for 5.0, and we'll address this at the next release (5.1).

View solution in original post

6 Replies
JesseCloutier
Esri Community Manager

Hi @tmerz-conet, we appreciate you sharing a potential bug with the broader Esri Community; however, Esri does not actively track software defects posted here. The official channel for investigating and validating bugs is Esri Technical Support. All customers experiencing a potential software bug should leverage technical support to report and investigate the issue.

By reporting bugs through technical support, Esri can better track the scope and impact of the issue across all our customers and better prioritize it with our product teams. Our teams can also investigate the issue more thoroughly to see if there is a solution, workaround, or patch to get you back up and running as soon as possible.

As a reminder, Esri Community is primarily a self-service support platform where Esri users can ask or answer each other’s questions, share feature requests, and collaborate to solve problems with GIS.

*Note that this is a scripted message prompted when posts allude to a potential product bug.

Jesse Cloutier
Community Manager, Engagement & Content
tmerz-conet
Emerging Contributor

I tried to contact the technical support via Create a Case | Esri Support, but my account does not have permission to report via this page.

0 Kudos
Noah-Sager
Esri Regular Contributor

Hi @tmerz-conet, thanks for posting your issue here. Esri Community is a great place to share ideas and ask questions, but actual bugs should be logged with Technical Support if possible.

That being said, can you please share a simplified reproducible test-app, someplace like codepen, that clearly demonstrates the issue?

0 Kudos
tmerz-conet
Emerging Contributor

here is a codepen showing the issue: locationToAddress bug

0 Kudos
Noah-Sager
Esri Regular Contributor

Thanks @tmerz-conet, this looks valid. I'm not sure that this is a regression, as I feel like we have the same issue at 4.34. However, your workaround looks good for 5.0, and we'll address this at the next release (5.1).

tmerz-conet
Emerging Contributor

It is possible that the issue was already present in version 4.34. I did upgrade from 4.33.12 directly to 5.0.10.

Thanks for addressing the issue!