POST
|
SpatialQueryFilter was exactly what I needed. It worked perfectly, and actually helped me in a few other places, thank you so much!
... View more
08-18-2015
09:08 AM
|
0
|
0
|
781
|
POST
|
Hello all, I've spent quite a bit of time now trying to do something that should be relatively simple. I've been up and down the API reference, I've tried looking here, and at gis.StackExchange, and I still can't seem to find what I'm looking for. What I want: I have multiple FeatureLayers containing in house data, when a user selects a menu option, I want the map to pan and zoom to their relevant features (which are probably not in the current map extent). This is a WPF app and is using the newer .NET runtime, not the WPF one. (.NET 4.5, Runtime v10.2.5) Details: I have three FeatureLayers, initially the map extent is set to a specific area, with all layers operating on demand. I have a menu, with different "regions" we'll call them. When a user selects their region, I want to pan/zoom to it. The regions change very often, so instead of trying to set some static extents, I'm instead trying to use the data that is currently available to that region. I was hoping to simply set the FeatureServiceTable.Where's to their appropriate definition, and magically zoom to the cumulative extent of all three layers. I know each FeatureServiceTable will have it's extent property, however that is for the entire table; I want the extent of the filtered features to pass to MyMapView.SetViewAsync(filteredFeaturesExtent, new TimeSpan...). Unless I'm missing something, there's no "pan the map to the only features that should be on it" method. What I've Tried: My data are all points, so after lots of googling, I decided to try making my own shape. I used a MultiPointBuilder to create a MultiPoint shape, and then got the extents from the shape. This kind of worked, I was having lots of issues with null QueryResults though, and decided to try something else. I then decided I would try to use Linq on the feature collections returned from the FeatureServiceTable.QueryAsync method. Again this seemed to work, but with the same issues as before. I know the features exist, but aren't being returned as results. I reworked the Linq quite a bit, worked out my own bugs, etc, but nothing was helping. I then decided that it was probably querying via the current extent. So, before I try querying for features, I set the MapView extent to a nice wide view of the continental US. This also didn't help in the right way... I still have to set the layers' definitions, refresh all the feature tables, set the whole USA extent, THEN query for the features, then call SetView to pan the map to them. Isn't there a better way? My issue with this is that there seems to be too many redundant calls to the server: Cast 3 FeatureLayer.FeatureTable to ServiceFeatureTable (suggestions? this is how it was done somewhere on the reference) Set the ServiceFeatureTable.Where's Call ServiceFeatureTable.Refresh(false) on each table Set the MapView extent to the continental US Collect features and aggregate them (via ServiceFeatureTable.QueryAsync(queryFilter) and creating a collection) Linq out the extent based on the features in the collection, I could also go back to a shape if needed Call SetViewAsync(myEnvelope, timeSpan) Refresh all the FeatureLayers again, because it never seems to grab everything the first time. I first tried without doing this, thinking the changing extent would cause all the features to be reloaded automatically. However, maybe 1/3rd of the time, I'll leave it alone, and wait to see if my timer finds anymore features, and it always does. What is the best way to query for, and find the extent of a group of points which are probably not even in the map extent? Is this the only way I'll be able to pan the map to features that aren't loaded? Is there some hidden overload of the QueryAsync method that would allow me to pass in a wider extent than the current view? Any and all tips and tricks will be greatly appreciated as I feel this is a little cumbersome to simply pan and zoom the map.
... View more
08-10-2015
02:55 PM
|
0
|
2
|
4525
|
POST
|
Doug, I'm not sure this is the "proper" answer, however I was having a similar issue and this helped quite a bit. My team lead sent me a sample, and I noticed his basemap renders very crisp/clear, while mine was rendering fuzzy. I messed with it for quite some time (we're both using the .NET Runtime SDK, not the WPF SDK), and this is what I came up with. The Grid element I'm speaking of is my topmost container element on the window (<Window...><Grid...><MapView.../></Grid></Window>). Originally my Grid (5 x 5) had controls along the top, left and right edges with the map in the middle of the window: <esri:MapView ... Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="3" Grid.RowSpan="4"> As soon as I set the MapView to start drawing from the top left of the window, and just let my controls draw on top of the map, it started rendering much more clearly. While this is a lot better than it was, it still isn't rendering nearly as crisp as your WPF example. So if you happened to find something more solid please share it with us here, but this definitely made mine more clear. <esri:MapView ... Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="5" Grid.RowSpan="5">
... View more
06-08-2015
02:58 PM
|
0
|
0
|
271
|
POST
|
In response to Michael's request for requirements: - All of our points will be read from the enterprise geodatabase (SQL Server), and we would like to cluster multiple layers (6-8 query/feature layers), all containing points. We never used Flex or Silverlight here, however the examples we've seen from both are exactly what we're looking for. - We are trying to cluster less than 50,000 points, and I see the likely number of points being something more like 500-2,000 points as we're filtering all layers. Some of our filtering could produce points near the 10,000 range, and if we were to fumble and display all the points at once they would number just under 50,000. Our use case is not to make the map faster by reducing points, but to make the points easy/possible to tap on by flaring them out. - All we need to have happen, is when the user clicks(taps) a cluster of points is for them to spread/spider out. They should then be able to tap a point to see the point's popup window. We have tons of points that share the exact same lat/long, and we can't have points being hidden behind others eg: "oh that business operation wasn't performed because we didn't know anything was there.". - I wouldn't mind having an optional explode/spider effect on hover as we would use it. However, I can see users with even more points finding an explode on hover feature that cannot be turned off to be problematic. Example of the cluster flare I've been referring to: ArcGIS API for Silverlight PS - We also have some maps in the JS API that need this too. extras/ClusterLayer from the JS API does not do anything for us as we have tons of points that share lat/long. If used, the users would have to tap through 20-50 popup windows before getting to the point they need. Luckily for now we're still in our research phase and Google Maps will continue to hum along in prod. But, very slowly ESRI maps are being deployed, and eventually we're going to run out of maps to make that don't need some sort of cluster flare. EDIT: I believe operationally we could benefit from information gained from heatmaps as well.
... View more
06-05-2015
01:40 PM
|
1
|
0
|
1131
|
Title | Kudos | Posted |
---|---|---|
1 | 06-05-2015 01:40 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|