|
POST
|
Upon closer review seems the calls are not the same, it looks like having a space in my Parameter Name causes an issue because the space was being replaced with a '_' by the GPString (which seems odd to me), which does not happen when called from a browser. Changed the Parameter names to have no space and all is well
... View more
07-11-2012
06:46 AM
|
0
|
0
|
326
|
|
POST
|
My bad, I actually had not seen the updated FeatureDataGrid. Surprised no one though to expose that property, but looking at the code does not seem there would be anyway without making your own modified FeatureDataGrid
... View more
07-11-2012
06:44 AM
|
0
|
0
|
1794
|
|
POST
|
I am trying to run a Geoprocessing Task from my Silverlight application. But when I do it fails and gives the error: Error Code '500': 'GPTask 'GetImagePath' does not exist or is inaccessible' I can run this through my browser and it all works and I have checked in Fiddler and the commands are basically identical except the browser call includes the empty parameters for SpatialReference (and of course f=html). This is not a secure service Is there something I need to be setting that I am missing? Thanks -Joe
... View more
07-11-2012
01:02 AM
|
0
|
1
|
538
|
|
POST
|
Hi, I'm trying to make a datagrid that autopopulates with a handful of counties. I believe the new featuredatagrid and the querytask would be the best way to do this so I can keep the parameters dynamic as to which counties are in the datagrid. I have two questions about this, how would I go about only returning specific, pre-set results through the querytask (is it through use of the "Where" public property or "ObjectID")? And my second question is, how would I pre-set the featuredatagrid to autozoom to selected Item instead of autozoom to selected being toggle off by default. I can't seem to find that property setter anywhere in the API reference. Thanks for any help. The FeatureDataGrid binds to a GraphicsLayer so there are two approaches you can use. Either using a FeatureLayer (which inherits from GraphicsLayer) or use a GraphicsLayer and add the Graphics objects in code. Personally I think if possible the FeatureLayer simplifies things over running a Query and then adding Graphics to the GraphicsLayer, but neither way is more correct than the other. As for using ObjectId property or the Where clause it is really another case of there is no best answer. I think in general the Where is more standard because the ObjectID could potentially change (like if for some reason data was reloaded into a Feature Class). If there is not some attribute that is being used (e.g., all counties with population over 1,000,000 or counties with the best BBQ 🙂 - you are in TX right?) you can always use a SQL In clause on the name (Where = "Name In (CountyA, CountyB,...)") This thread may help with how to go about zooming to the location when the user clicks on the item in the FeatureDataGrid. http://forums.arcgis.com/threads/58076-zoom-to-points?p=201782#post201782 Hope that helps
... View more
07-10-2012
09:53 PM
|
0
|
0
|
1794
|
|
POST
|
Hi, I'm looking for a way to get the Geometry Type of a layer, giving its URL (e.g. http://services.arcgisonline.com/ArcGIS/rest/services/Demographics/USA_Average_Household_Size/MapServer/1 returns esriGeometryPolygon in REST but how can I get it programmatically? Thanks a lot, Miri AFAIK the only way would be to actually make the rest call and find it from the returned json object using WebClient.
private void GetLayerDescription()
{
var webClient = new WebClient();
webClient.OpenReadCompleted += DownloadComplete;
webClient.OpenReadAsync(new Uri("http://services.arcgisonline.com/ArcGIS/rest/services/Demographics/USA_Average_Household_Size/MapServer/1?f=json"));
}
private string _geometryType;
private void DownloadComplete(object sender, OpenReadCompletedEventArgs e)
{
if ( e.Error != null ) return;
var jsonObject = JsonValue.Load(e.Result) as JsonObject;
if ( jsonObject == null ) return;
JsonValue geometryTypeJsonValue;
if ( jsonObject.TryGetValue("geometryType", out geometryTypeJsonValue) )
{
_geometryType = geometryTypeJsonValue;
}
}
(JsonObject is in the System.Json assembly) Good Luck -Joe
... View more
07-10-2012
06:40 AM
|
0
|
0
|
1004
|
|
POST
|
Hello everyone, I know it is something related to silverlight i just post it if anybody has answer then he or she can help me. everything is working fine in my application but I noticed that XAP file is getting bigger and bigger I have used silverpdf.dll which size is around 2 mb if i remove it from project than xap file will reduce by 800 kb.but i am using many methods of that dll.I create class library but the xap file is same so any body know that how to add third party dll in reference with out changing xap file size? Please help, Thanks Foram There is no way to do that. The xap contains all the assemblies you reference. It needs to be there otherwise your application would not run. A Silverlight application runs inside the Silverlight plugin on the clients machine. All assemblies required by the application must, therefore, be downloaded to the client machine. There are ways to break things into multiple Xap files so it only downloads what it needs when it needs it, but that is a pure (advanced) Silverlight discussion which you could try to search MSDN or other Silverlight sites for.
... View more
07-09-2012
08:10 PM
|
0
|
0
|
560
|
|
POST
|
I was playing around with this and I notice that after initialization the VisibleLayers collection is still null (which would explain the error). It is not until a method call has been made to SeLayerVisisibility has been made that this collection is actually available. This explains the behavior you see because clicking a layer on the Legend will make a call internally to SetLayerVisibility. I checked this on both 3.0 and 2.4 and see the same behavior. Personally, I would consider this a bug. The idea that you cannot check what layers are visible prior to turning one on or off does not make any sense. I cannot believe this has not been noticed before, but I have not seen a post about it. I found a work around that seems to work. Add a LayersInitialized handler and for a SublayerId you know is Visible call SetLayerVisibility(id, false) then SetLayerVisibility(id, true) immediately after that. This seems to initialize the VisibleLayers collection. Hope that helps -Joe
... View more
07-09-2012
08:03 PM
|
0
|
0
|
1497
|
|
POST
|
Thanks but inside our network the speed is good but outside it is working slow. I think it is something related to dsl.do you know how to check the issue? Yes I understand that, which is why I think it is your upload speed (meaning the bandwidth you have to upload data to the internet) may be slow. Internally you probably have 10 MB/s or faster bandwidth. As I mentioned in my previous post go to a site such as http://speedtest.net/ and just click the Begin Test button it will show you a realistic estimate of both download and upload bandwidth to the internet. It is not uncommon for some ISPs to only give about 1/10 (or less) upload speed compared to what your download bandwidth is. So you may have a connection advertised as 15 mb/s (download) which is giving only 1 mb/s upload speed. Hope that helps
... View more
07-09-2012
07:41 PM
|
0
|
0
|
840
|
|
POST
|
Jared, The Except() method is meant to return an IEnumerable<T> of all the elements in an IEnumerable<T> that are not a provided IEnumerable<T> (huh :)). So the usage is like this IEnumerable<int> myInts = westTexas.VisibleLayers.Except(new[] {0}); Which returns an IEnumerable<int> of all the values in VisibleLayers Except for 0, which is not really what you want. The code sample I provided should work to Toggle visibility of a given layer. You just need to use contains backwards, if .Contains returns false, then pass SetLayerVisibility a value of true private void ToggleVisibility(int layerId) { var westTexas = TabletMap.Layers["West Texas"] as ArcGISDynamicMapServiceLayer; if ( westTexas == null ) return; //this will return True if the VsibleLayers includes layerId (is Visible), or False if it is not included (not visible) bool isVisible = westTexas.VisibleLayers.Contains(layerId); //This will flip the visbility, if layerId was vsible it rurns it off, if it is not visible it turns it on. westTexas.SetLayerVisibility(layerId, !isVisible); } Hope that helps -joe
... View more
07-09-2012
07:03 AM
|
0
|
0
|
1497
|
|
POST
|
So I re-installed ArcGIS and Python and the SearchCursor works now, so was a problem with the install. Thanks for all the help -Joe
... View more
07-08-2012
03:01 AM
|
0
|
0
|
215
|
|
POST
|
I think this is probably really simple to do but I cannot seem to figure out how to return a table from a Geoprocessing service. My service creates a table and I want to return that to the caller. Documentation indicates a table can be used as the return value and AGS will convert it to a FeatureSet to return. I have tried numerous incarnations of SetParameter or SetParameterAsText with different values as the return parameter and keep getting RuntimeError>Object:Error Setting Parameter (or Parameter as Text) Can anyone post a sample of how I would return a table from my scratch workspace as the result of a GP Service Thanks -Joe
... View more
07-07-2012
09:43 PM
|
0
|
5
|
1373
|
|
POST
|
The way to change visibility is to use the SetLayerVisibility method on the ArcGISDynamicMapServiceLayer instead of removing/adding from the VisibleLayers collections, something like.
var westTexas = TabletMap.Layers["West Texas"] as ArcGISDynamicMapServiceLayer;
bool isVisible = westTexas.VisibleLayers.Contains(0);
westTexas.SetLayerVisibility(0, !isVisible);
Hope that helps -Joe
... View more
07-06-2012
08:01 PM
|
0
|
0
|
1497
|
|
POST
|
One thing that caused me some initial headaches was the System.Windows.Interactivity assembly. Have you downloaded the Blend 5.0 preview and made sure you are using that assembly? Good Luck
... View more
07-05-2012
09:45 PM
|
0
|
0
|
501
|
|
POST
|
Foram, To me all the evidence points to an issue with you network (slow site loading and poor map performance). Either there is something internal that is cause a bottleneck for uploading data or your provider is simply not providing you very good upload bandwidth. Have you run a tool like http://speedtest.net/ to get a general idea of what your upload speed is?
... View more
07-05-2012
09:13 PM
|
0
|
0
|
840
|
|
POST
|
Are your FeatureClasses stored in an enterprise GDB (e.g., Oracle, SQL Server)? I believe OrderBy functionality is only supported in an enterprise GDB and will not work with a file GDB.
... View more
07-05-2012
09:01 PM
|
0
|
0
|
1189
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-23-2025 12:16 PM | |
| 1 | 10-19-2022 01:08 PM | |
| 1 | 09-03-2025 09:25 AM | |
| 1 | 04-16-2025 12:37 PM | |
| 1 | 03-18-2025 12:17 PM |
| Online Status |
Offline
|
| Date Last Visited |
12-04-2025
04:12 PM
|