Geocoding limited to a Search Area broke with ArcGIS Online update

1358
5
Jump to solution
04-19-2021 02:05 PM
JoeHershman
MVP Regular Contributor

We have an application with on-line geocoding that has been deployed for a few years and working fine.  All of the sudden (seeming to correspond to the upgrade to Geocoding Service) it stopped working.

We limit searches to a small geographic area  and because of this have never required the users to enter a  Zip or city.  As stated this worked perfectly for years until the other day.  Now unless a zip or city is entered we do not get a valid result.  We instead get a single result returned but with all the attributes empty, and the point is just in the middle of the extent

JoeHershman_0-1618865666277.png

We are using Runtime version 100.6

So... before the other day

  • Send request without city or zip code and we get a set of good results within service area at that number and street

Starting a few days ago

  • Send request without city or zip, receive single (bad) results with empty attributes located at a random location
  • Send request with city or zip and receive the same results as before when sent without city or zip 

-Joe

@MichaelBranscomb 

 

 

Thanks,
-Joe
0 Kudos
1 Solution

Accepted Solutions
JoeHershman
MVP Regular Contributor

This is very odd.  Mind you nothing has changed in this in years.

But I was noticing how it showed the region strings in the content.  This is how State is setup in the view, and the user just picks a value from the dropdown

<ComboBox Grid.Column="1" SelectedIndex="0" SelectedValue="{Binding State}">
	<ComboBox.Items>
		<ComboBoxItem Content="PA" />
		<ComboBoxItem Content="WV" />
		<ComboBoxItem Content="KY" />
	</ComboBox.Items>
</ComboBox>

But what I decided to do was make a change, because the string shown in my first post seemed odd.  Previously, I just had State bound directly, but I changed it to

State = ((ComboBoxItem)State).Content.ToString()

After this change I am again getting valid results without needing the additional input.

Based on the timing of the issue appearing and the fact that there was an April update to the geocoding service I am still going to put that update as the cause.  But what it seems is that prior to the change the string 

System.Windows.Controls.ComboBoxItem: PA

was parsed as PA.  But after the update that was no longer the case.  I will not argue that parsing the above string to 'PA' should have been expected behavior.  Simply that evidence points to that was what was occurring.  After making the change in the code things seem to be working as expeected.

Thanks for the help, putting everything down and also looking at what happened with the query (and some Fiddler) pointed me where I needed to find the solution

-Joe

Thanks,
-Joe

View solution in original post

5 Replies
BradNiemand
Esri Regular Contributor

Joe,

 

Can you give an example of what the input was that worked before but doesn't now?

 

Brad

0 Kudos
JoeHershman
MVP Regular Contributor

Below is the input of a search that previously returned results and no longer does

searchValues
Count = 5
[0]: {[address, 375 North Shore Dr]}
[1]: {[city, ]}
[2]: {[region, System.Windows.Controls.ComboBoxItem: PA]}
[3]: {[postal, ]}
[4]: {[postalExt, ]}


parameters.SearchArea
{Envelope[XMin=1011246, YMin=13425000, XMax=2487548, YMax=15124138, Wkid=32167]}
Depth: 0
Dimension: Area
Extent: {Envelope[XMin=1011246, YMin=13425000, XMax=2487548, YMax=15124138, Wkid=32167]}
GeometryType: Envelope
HasCurves: false
HasM: false
HasZ: false
Height: 1699138
IsEmpty: false
MMax: NaN
MMin: NaN
SpatialReference: {SpatialReference[Wkid=32167]}
Width: 1476302
XMax: 2487548
XMin: 1011246
YMax: 15124138
YMin: 13425000
ZMax: 0
ZMin: 0

Thanks,
-Joe
0 Kudos
BradNiemand
Esri Regular Contributor

Joe,

 

I am trying to reproduce your issue via REST and can't.  Am I missing something?

 

https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?Address=37...

 

Brad

BradNiemand
Esri Regular Contributor

URL above is correct but the display of the URL gets cut off.

 

Brad

JoeHershman
MVP Regular Contributor

This is very odd.  Mind you nothing has changed in this in years.

But I was noticing how it showed the region strings in the content.  This is how State is setup in the view, and the user just picks a value from the dropdown

<ComboBox Grid.Column="1" SelectedIndex="0" SelectedValue="{Binding State}">
	<ComboBox.Items>
		<ComboBoxItem Content="PA" />
		<ComboBoxItem Content="WV" />
		<ComboBoxItem Content="KY" />
	</ComboBox.Items>
</ComboBox>

But what I decided to do was make a change, because the string shown in my first post seemed odd.  Previously, I just had State bound directly, but I changed it to

State = ((ComboBoxItem)State).Content.ToString()

After this change I am again getting valid results without needing the additional input.

Based on the timing of the issue appearing and the fact that there was an April update to the geocoding service I am still going to put that update as the cause.  But what it seems is that prior to the change the string 

System.Windows.Controls.ComboBoxItem: PA

was parsed as PA.  But after the update that was no longer the case.  I will not argue that parsing the above string to 'PA' should have been expected behavior.  Simply that evidence points to that was what was occurring.  After making the change in the code things seem to be working as expeected.

Thanks for the help, putting everything down and also looking at what happened with the query (and some Fiddler) pointed me where I needed to find the solution

-Joe

Thanks,
-Joe