POST
|
I'm wondering if there's anyway to get a value from a particular feature via the popup, and pass it along to a tool. I'm envisioning a tool that is in the popup, and when you click on that feature, then click the tool in the popup window, it grabs the attribute from that particular feature. (Say, a unique identifier.) Then I can use that attribute in the tool to run a query against an entirely different table and return the results. Is there a way to do this? Thanks!
... View more
06-02-2014
03:10 AM
|
0
|
1
|
1438
|
POST
|
I've seen this post about using the network location information to show a user's location in the viewer: http://davetimmins.wordpress.com/2011/09/20/geolocation-with-the-esri-silverlight-api/ This is clearly not intended for the OoTB silverlight viewer, however... has anyone been able to create something like this for the viewer? It looks like it would be possible to create a plug in that does something similar, but I'm afraid that it's over my head at this point. Anyone? Thanks!
... View more
04-01-2014
10:36 AM
|
0
|
0
|
980
|
POST
|
Do you mean once you've uploaded and saved it into a viewer? At that point, you'd find it at C://inetpub/wwwroot/Apps/YourApplicationName/Extensions/YourExtension.xap. Hope that helps!
... View more
04-01-2014
10:24 AM
|
0
|
0
|
349
|
POST
|
The first time my application is used during the day, there's always a few layers that won't load. (Appears random, different each time.) If you hit F5 or refresh, as soon as the application refreshes, everything works fine. If the app is closed and not used for long enough, several hours, the same issue will reoccur. I've tried everything; in Server Manager, I've set the refresh properties to shortly before the start of the work day, and I've set the services in question to recycle every 20 minutes. I've set the timeout for the application pool in IIS to 60 minutes. I've gone into the map.config and explicitly set "DisableClientCaching=True" for every layer. Nothing has worked. I considered making a behavior that simply redirects back to the url when the map is loaded, but I'm not sure how to do that without it creating a refresh loop. Does anyone have any ideas? I've been fighting with this for over a week now.
... View more
02-21-2014
04:32 AM
|
0
|
3
|
3665
|
POST
|
I agree, the xaml should be pretty easy, it's the code behind that's got me stumped. Is there any way you could upload your code so I could take a look at it, as an example? Thanks!
... View more
02-05-2014
06:00 AM
|
0
|
0
|
219
|
POST
|
It looks like the issue is that STATE is not actually an attribute in your feature class. Should you be referencing SNAME instead?
... View more
01-09-2014
10:15 AM
|
0
|
0
|
411
|
POST
|
I believe in a previous post it was said that you can't create a custom addin that mimics the behavior of the bookmark sample in the API samples. The one in the viewer allows you to set the bookmarks in the builder, but the API one allows the user to set and save bookmarks. It was said that the bookmarks wouldn't persist in the viewer, once the browser was closed. Is this still the case? Has anyone had any luck creating an addin (I assume it would use isolated storage?) that would save user created bookmarks, or have any advice on where I might look to start creating one? Or is it impossible? Thanks!
... View more
01-08-2014
10:09 AM
|
0
|
3
|
640
|
POST
|
I'm trying to connect to my map services using the proxy.config example for the silverlight viewer; I have followed all of the instructions exactly, and I'm using credentials I supply in the proxy.config. However, when I click the "Use proxy" button and enter my server name, it tells me "Cannot connect to servername". It's starting to drive me a bit nuts, can anyone help?
... View more
10-21-2013
08:05 AM
|
0
|
0
|
2136
|
POST
|
I have a query task that then populates a datagrid with the results. I'd like to be able to zoom to a particular feature when it's clicked on in the datagrid using the SelectionChanged event; (I'm using selectionchanged rather than the mousedown event because I'm doing this as an add-in to the Silverlight Viewer, and mousedown doesn't work; I've posted this to the Viewer forum as well, but sometimes in the past I've had more response in this forum.) I have it working with the results from a FindTask, using the findresult, but I can't quite figure out how to make it work with QueryTask and FeatureSet. Can anyone help? I've included the code below for the FindTask code, but I haven't been able to correctly alter it to work for the Query results. private void FindResults_SelectionChanged(object sender, SelectionChangedEventArgs e) { // Highlight the graphic feature associated with the selected row DataGrid dataGrid = sender as DataGrid; int selectedIndex = dataGrid.SelectedIndex; if (selectedIndex > -1) { FindResult findResult = (FindResult)resultsDataGrid.SelectedItem; Graphic graphic = findResult.Feature; ESRI.ArcGIS.Client.Geometry.Envelope selectedFeatureExtent = findResult.Feature.Geometry.Extent; ESRI.ArcGIS.Client.Geometry.Envelope displayExtent = new ESRI.ArcGIS.Client.Geometry.Envelope( selectedFeatureExtent.XMin - 500, selectedFeatureExtent.YMin - 500, selectedFeatureExtent.XMax + 500, selectedFeatureExtent.YMax + 500); MapApplication.Current.Map.ZoomTo(displayExtent); string StrGeometry = findResult.Feature.Geometry.GetType().ToString(); if (StrGeometry.Equals("ESRI.ArcGIS.Client.Geometry.MapPoint")) { graphic.Symbol = Circle; } if (StrGeometry.Equals("ESRI.ArcGIS.Client.Geometry.Polygon")) { graphic.Symbol = Fill; } if (StrGeometry.Equals("ESRI.ArcGIS.Client.Geometry.Polyline")) { graphic.Symbol = YellowLine; } GraphicsLayer graphicsLayer = MapApplication.Current.Map.Layers["MyGraphicsLayer"] as GraphicsLayer; graphicsLayer.ClearGraphics(); graphicsLayer.Graphics.Add(graphic); } }
... View more
08-08-2013
12:25 PM
|
0
|
1
|
2027
|
POST
|
I have a query task that then populates a datagrid with the results. I'd like to be able to zoom to a particular feature when it's clicked on in the datagrid using the SelectionChanged event; I have it working with the results from a FindTask, using the findresult, but I can't quite figure out how to make it work with QueryTask and FeatureSet. Can anyone help? I've included the code below for the FindTask code, but I haven't been able to correctly alter it to work for the Query results. private void FindResults_SelectionChanged(object sender, SelectionChangedEventArgs e) { // Highlight the graphic feature associated with the selected row DataGrid dataGrid = sender as DataGrid; int selectedIndex = dataGrid.SelectedIndex; if (selectedIndex > -1) { FindResult findResult = (FindResult)resultsDataGrid.SelectedItem; Graphic graphic = findResult.Feature; ESRI.ArcGIS.Client.Geometry.Envelope selectedFeatureExtent = findResult.Feature.Geometry.Extent; ESRI.ArcGIS.Client.Geometry.Envelope displayExtent = new ESRI.ArcGIS.Client.Geometry.Envelope( selectedFeatureExtent.XMin - 500, selectedFeatureExtent.YMin - 500, selectedFeatureExtent.XMax + 500, selectedFeatureExtent.YMax + 500); MapApplication.Current.Map.ZoomTo(displayExtent); string StrGeometry = findResult.Feature.Geometry.GetType().ToString(); if (StrGeometry.Equals("ESRI.ArcGIS.Client.Geometry.MapPoint")) { graphic.Symbol = Circle; } if (StrGeometry.Equals("ESRI.ArcGIS.Client.Geometry.Polygon")) { graphic.Symbol = Fill; } if (StrGeometry.Equals("ESRI.ArcGIS.Client.Geometry.Polyline")) { graphic.Symbol = YellowLine; } GraphicsLayer graphicsLayer = MapApplication.Current.Map.Layers["MyGraphicsLayer"] as GraphicsLayer; graphicsLayer.ClearGraphics(); graphicsLayer.Graphics.Add(graphic); } }
... View more
08-08-2013
07:04 AM
|
0
|
0
|
2336
|
POST
|
It actually was a problem with the case sensitivity of the where clause, and I've got that part fixed. Now, however, none of the features will draw. private void QueryTask_ExecuteCompleted(object sender, QueryEventArgs args) { GraphicsLayer graphicsLayer = MapApplication.Current.Map.Layers["MyGraphicsLayer"] as GraphicsLayer; FeatureSet featureSet = args.FeatureSet; if (featureSet.Features.Count > 0) { foreach (Graphic resultFeature in featureSet.Features) { resultFeature.Symbol = YellowLine; graphicsLayer.Graphics.Add(resultFeature); } MessageBox.Show(featureSet.Features.Count.ToString() + " lines found"); } }
... View more
07-08-2013
11:13 AM
|
0
|
0
|
153
|
POST
|
Since I'm only looking at one layer for this, I've also tried it as a query task. However it returns 0 features every time, even though it should be returning 8-10. Here's the code. QueryTask queryTask = new QueryTask("http://myserver/ArcGIS/rest/services/CGT/MainLayers/MapServer/10"); queryTask.ExecuteCompleted += QueryTask_ExecuteCompleted; queryTask.Failed += QueryTask_Failed; Query query = new Query(); query.ReturnGeometry = true; query.OutFields.AddRange(new string[] { "SUBSYSTEM" }); query.Where = Subsystem.Text; queryTask.ExecuteAsync(query);
... View more
07-08-2013
05:29 AM
|
0
|
0
|
153
|
POST
|
Also, just realized that actually shows it searching two fields, not one. That was a change I just now made to test something; originally it was running against only one field, same results.
... View more
07-05-2013
06:53 AM
|
0
|
0
|
153
|
POST
|
I have a find task set to search one layer, one field, but it takes 60+ seconds to run, or completely times out. There are only 115 total features in the layer, and only 11 that actually match the query. Anyone know why it's taking so long or how to speed it up? It's a line feature. Here's the code: public void RunFindTask() { busyIndicator1.IsBusy = true; GraphicsLayer graphicsLayer = MapApplication.Current.Map.Layers["MyGraphicsLayer"] as GraphicsLayer; graphicsLayer.ClearGraphics(); FindTask cgtFindTask = new FindTask("http://myserver/ArcGIS/rest/services/CGT/MainLayers/MapServer"); cgtFindTask.ExecuteCompleted += cgtFindTask_ExecuteCompleted; cgtFindTask.Failed += FindTask_Failed; FindParameters cgtFindParameters = new FindParameters(); cgtFindParameters.ReturnGeometry = true; cgtFindParameters.SpatialReference = MapApplication.Current.Map.SpatialReference; cgtFindParameters.LayerIds.AddRange(new int[] { 10 }); cgtFindParameters.SearchFields.AddRange(new string[] { "SUBSYSTEM", "SYSTEM_NM" }); cgtFindParameters.SearchText = Subsystem.Text; cgtFindTask.ExecuteAsync(cgtFindParameters); }
... View more
07-05-2013
06:52 AM
|
0
|
3
|
631
|
POST
|
I asked the same thing when I started working with the viewer! You can find the answer in this post, and it's worked very well for me: http://forums.arcgis.com/threads/57142-Changing-the-pop-up-heading
... View more
05-24-2013
06:18 AM
|
0
|
0
|
197
|
Title | Kudos | Posted |
---|---|---|
1 | 03-09-2019 08:09 PM | |
1 | 07-03-2012 09:19 AM | |
1 | 05-30-2018 07:52 AM | |
1 | 05-03-2012 10:23 AM |
Online Status |
Offline
|
Date Last Visited |
10-31-2023
02:28 PM
|