I'm trying to use a query task against a local datasource (mpk) and it seems to only return the first 1000 features. Is there a way to change this?
_localMapService = new LocalMapService() { Path = "..\\..\\..\\Data\\MPKS\\USCitiesStates.mpk", MaxRecords = 500000 }; _localMapService.Start();
QueryTask queryTask = new QueryTask(); queryTask.Url = _localMapService.Url + "/0"; queryTask.ExecuteCompleted += QueryTask_ExecuteCompleted; queryTask.Failed += QueryTask_Failed; Query query = new ESRI.ArcGIS.Client.Tasks.Query(); query.OutFields.AddRange(new string[] { "STATE_NAME", "POP2000" }); query.Geometry = args.Geometry; query.ReturnGeometry = true; queryTask.ExecuteAsync(query);
I should have elaborated a bit more about what I was doing. I was actually defining a feature layer that implemented clustering and maptips to make sure that although I was returning a lot of features they were being displayed appropriately. The result of having to define my feature service programmatically to set the max records and then the feature layer programmatically means that I then have to either then write and set the flareclusterer in code and same with the maptips (or at least write them as data template in XAML and load them in code). This is quite a big overhead in terms of effort. If I had less than 1000 features then I could have declared everthing in a few lines XAML. Is there any chance the max records property could actually go on the feature layer instead. It would make things so much easier.
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.