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
We are using Runtime version 100.6
So... before the other day
Starting a few days ago
-Joe
Solved! Go to Solution.
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
Joe,
Can you give an example of what the input was that worked before but doesn't now?
Brad
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
Joe,
I am trying to reproduce your issue via REST and can't. Am I missing something?
Brad
URL above is correct but the display of the URL gets cut off.
Brad
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