MMPK Locator Discrepency Between Pro and Runtime

3115
13
Jump to solution
04-30-2019 02:19 PM
KyleGruber
Occasional Contributor II

I'm seeing a difference in the way the suggestion/geolocation functionality works in ArcGIS Pro compared to Runtime.  I've finally come up with a locator that works the way I want it to in pro, but it does not work the same way in runtime.

Search in Pro:

Pro Locator Search

Search in Runtime:

Runtime Locator Search

If I put 9 E Broad in the locator search in runtime, it turns up a result, but that's exactly what I'm trying to avoid.  As far as I understand, I'm using the same exact locator in both Pro and Runtime.  Please tell me I'm missing something obvious here!

Repro Project:

https://helpdesk.alertts.com/content/ArcGISApp1.7z

Edit:  Just FYI, this is a Street Address Locator created in ArcGIS Pro 2.3.2 being consumed by Runtime SDK 100.5.

0 Kudos
13 Replies
PreetiMaske
Esri Contributor

In talking to developers of the geocoding team it seems the fix is in active development. Once it is done and ported to ArcGIS Runtime SDKs we should not see any differences. I will create a bug for this.

KyleGruber
Occasional Contributor II

Thanks as always Preeti.  I've seen some other threads that mention bug reports and being able to provide your customer number for your organization to be attached to a case and it becomes trackable in My Esri.

Kimberly McCarty‌ recently described this process in a separate thread.  No worries if you don't have the capability or it's going to cause a bunch of work.

0 Kudos
PreetiMaske
Esri Contributor

Hello again Kyle,

 

I have some update on the issue with differences in suggest results returned.  When performing Suggest operation, Pro automatically uses an extent to limit results. So doing a runtime search with just the text is not the same. So, to do a search that is similar/same you need to set SearchArea on SuggestParameters to the same search area Pro uses. But getting the two to use the exactly the same values is not easy. I tried following extent that gave me first two matching results that I see in Pro. You might have to refine search extent to get results matching Pro.

```

private async void LocationSearchBox_KeyUp(object sender, KeyEventArgs e)
{
if (e.Key == Key.Enter && !String.IsNullOrWhiteSpace(LocationSearchBox.Text))
{
Geometry searcharea = new Envelope(-10679603.1849148, 4311158.5891781, -10670629.0567609, 4315725.11168142, SpatialReferences.WebMercator);
var suggestParams = new SuggestParameters { MaxResults = 10, SearchArea = searcharea};

```

 

KyleGruber
Occasional Contributor II

Preeti,

You're my hero, this is perfect.  Just putting in the initial extent of the map as SearchArea makes this perform exactly as I would expect, with the same quickness and robust search behavior as Pro.  Thank you for bearing with me through this whole process!

Thank you!

0 Kudos