AnsweredAssumed Answered

4.2 Locator addressToLocations error

Question asked by SnoBrdinRTiste on Feb 8, 2017
Latest reply on Feb 9, 2017 by SnoBrdinRTiste

Hello,

I have a custom in-house Locator that accepts:

Address Fields:

  • Street ( type: esriFieldTypeString , alias: Street or Intersection , required: true , length: 60 )
  • Zone ( type: esriFieldTypeString , alias: Zone , required: false , length: 20 )

 

everything works fine in version 3.19

 

However, I keep getting an error in 4.2 

err.details:

               [Missing value for a required locator field 'Street or Intersection'.]

 

err.stack:  

Error: Unable to complete operation.
      at Anonymous function

(https://js.arcgis.com/4.2/:431:265)
      at f (https://js.arcgis.com/4.2/:117:491)
      at l (https://js.arcgis.com/4.2/:117:423)
      
at resolve

(https://js.arcgis.com/4.2/:120:86)
      at a (https://js.arcgis.com/4.2/:118:412)
      at f (https://js.arcgis.com/4.2/:118:169)
      at l (https://js.arcgis.com/4.2/:117:423)
      at resolve

(https://js.arcgis.com/4.2/:120:86)
      at a (https://js.arcgis.com/4.2/:118:412)
      at f (https://js.arcgis.com/4.2/:118:136)

 

 

 

here's the code that i'm using... following the 4.2 API

 

var address = { Street: '200 N Spring St', Zone: '90012' };   
var locator = new Locator();
    locator.url = '//myserver:6080/arcgis/rest/services/Locator/2011_Locator/GeocodeServer';
    locator.addressToLocations(address)
           .then(showAddressCandidates)
           .otherwise(rejectedPromise);

any help or insight into why this is happening would be greatly appreciated... its driving me nuts!

Outcomes