Hello,
I have a search widget that will gecode to our enterprise service with a standard us streets service, but it fails to return a result when using a composite service built from points and lines. In the us streets version, I set this variable singleLineFieldName: "Single Line Input", and it works to return a point. For the composite it is set up with singleLineFieldName: "SingleLine", and this fails to return a result. The service does work outside of the api page. Can the api work with a composite service?
here is the code that fails
includeDefaultSources: false,
sources: [
{
name: "Composite Address",
placeholder: "example: address",
singleLineFieldName: "SingleLine",
locator: new Locator({
url: "https://url.com/CompositeGeocode/GeocodeServer"
})
}
]
Hi @ColinGowens, the API should work fine with a composite geocoder. Here is an example app:
https://codepen.io/noash/pen/qBrRrPa?editors=1000
My hunch is that the issue is related to the composite geocoder itself. I found this thread with some tips about publishing a composite geocoder from Pro that might be useful: https://community.esri.com/t5/arcgis-online-questions/composite-address-locator/m-p/732528
If you want to share the URL to the geocoder you are using (if it's public), I can test with it as well.