AnsweredAssumed Answered

Search Widget sends incorrect query string (4.8 js api)

Question asked by PSLarkin_SpokaneCounty on Sep 4, 2018
Latest reply on Sep 5, 2018 by PSLarkin_SpokaneCounty

When using the Search Widget with a local geocoding service an incorrect query string is sent if the singleLineFieldName is not defined. "Single Line Input" is sent while "SingleLine" is the correct parameter name.

 

Example of poorly formed geocode request:  .../arcgis/rest/services/Locators/AddrComposite/GeocodeServer/findAddressCandidates?Single%20Line%20Input=808%20W%20Spokane%20Falls%20Blvd%2C%20Spokane%2C%20WA&f=json&outSR=%7B%22latestWkid%22%3A3857%2C%22wkid%22%3A102100%7D&magicKey=GST7YMc0AM9UOsEmObpaISTUYbTA1hp0&maxLocations=6

 

Property Defined:

sources = [{
    locator: new Locator({ url: "https://gis.spokanecounty.org/arcgis/rest/services/Locators/AddrComposite/GeocodeServer" }),
    name: "AddrComposite",
    placeholder: "search addresses",
    singleLineFieldName: "SingleLine",  //Property Defined
}];

 

Example of correct request after property is defined:

.../arcgis/rest/services/Locators/AddrComposite/GeocodeServer/findAddressCandidates?SingleLine=808%20W%20Spokane%20Falls%20Blvd%2C%20Spokane%2C%20WA&f=json&outSR=%7B%22latestWkid%22%3A3857%2C%22wkid%22%3A102100%7D&magicKey=GST7YMc0AM9UOsEmObpaISTUYbTA1hp0&maxLocations=6

Outcomes