Update... The locator will not work for providing a list of street names when only a couple of characters are provided.
For example: 'Will', 'Willo' return no results. While, 'Willow' or 'Willow Rd' will return results for 'Willow Rd'.
Using a query in the query task of: (L_ORDER08 = 'CO123' or R_ORDER08 = 'CO123') and UFULLNAME LIKE '%ERIE P%' gives a timeout exception when searching across file consisting of 10 states. All three of those fields have been indexed.
So, any suggestions, or is the runtime not capable of performing this task?
query.Where = "AREANAME = 'Hilo' OR AREANAME = 'Troy'";
query.Where = "AREANAME LIKE '%la%'";
Yes we are using the QueryTask, but it keeps timing out. The data we are using consists of 13 U.S. states using a geo database in a mappack.
Can a locator lookup by partial text? I.e. If I enter 'M', return everything with 'M...'. If I enter 'Mi', return everything with 'Mi...'. So far we have not been able to get the locator to work unless the search name is near complete. Also, when looking at the REST call for the locator, there are a bunch of properties for specifying the sensitivity settings, but I don't see any way to set those settings with the locator API. Am I missing something there? Also, to create a locator in arcmap, is there any way to specify the default sensitivity settings?
Found out about the address locator properties to edit the settings which do get used (my hack method must have missed something that forced the changes to be ignored). However, even after changing the settings, it doesn't produce any candidates if I only type the first few characters. Is there anyway for this type of search to return candidates?
Kerrie,
If you can provide your email, we can provide the ftp login information so that you can get the files that we are using for testing.
Regards,
mike
I don't have a sample app for you, but just using the QueryTask against the Streets layer of that data with a where clause like "NAME like '%SEARCH_STRING%'". I tried searching for a street called "E Northern Lights Blvd" starting letter by letter. So first it was '%N%', then it was '%No%' (we've since added a UNAME column with the names upper-cased, but you see the same behavior either way. Where it started timing out for me was about '%Norther%'. Any letters more than about 5 and it returned timeout exceptions. That layer has about 9,000,000 records in it, and we've also added indexes to the columns we are searching.
using System.Windows; using ESRI.ArcGIS.Client.Local; using ESRI.ArcGIS.Client.Tasks; namespace QueryTest { public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); LocalMapService mapService = new LocalMapService() { Path = @"C:\forums\zoll\MergedWestUC.mpk", MaxRecords = 5000000 }; mapService.StartAsync(); mapService.StartCompleted += (s1, e1) => { if (mapService.Error == null) { query(mapService); } }; } private void query(LocalMapService ms) { QueryTask queryTask = new QueryTask(); queryTask.Url = ms.UrlMapService + "/4"; queryTask.ExecuteCompleted += QueryTask_ExecuteCompleted; queryTask.Failed += QueryTask_Failed; Query query = new ESRI.ArcGIS.Client.Tasks.Query(); query.OutFields.AddRange(new string[] { "UNAME" }); query.ReturnGeometry = true; query.Where = "UNAME LIKE '%NORTHERN%'"; queryTask.ExecuteAsync(query); } private void QueryTask_Failed(object sender, TaskFailedEventArgs args) { MessageBox.Show("Query failed: " + args.Error); } private void QueryTask_ExecuteCompleted(object sender, ESRI.ArcGIS.Client.Tasks.QueryEventArgs args) { FeatureSet featureSet = args.FeatureSet; if (featureSet == null || featureSet.Features.Count < 1) { MessageBox.Show("No features retured from query"); return; } } } }
Synchronous "N" - 0.216s "No" - 0.531s "Nor" - 1.51s "Nort" - 3.018s "North" - 3.457s "Northe" - 12.565s "Norther" - 12.751s "Northern" - 12.511s "Northern " - 12.492s "Northern L" - 71.665s "Northern Li" - 64.156s "Northern Lig" - 64.527s Asynchronous "N" - 0.517s "No" - 0.615s "Nor" - 1.666s "Nort" - 3.304s "North" - 3.776s "Northe" - 14.143s "Norther" - 13.362s "Northern" - 13.219s "Northern " - 13.160s "Northern L" - 69.969s "Northern Li" - 65.064s "Northern Lig" - 65.164s