POST
|
Hi, I'm creating a Experience Viewer and I need to apply a filter by parameters. In a data source, I have a column which containg string values; in that column I need to apply a search by several values, in a SQL clause I would use an IN clause (for example: column in ("value1", "value2")) to put all the values I need. Is there any way to use the data_filter parameter with an IN clause?
... View more
10-13-2023
04:37 PM
|
0
|
1
|
291
|
POST
|
Hi, We couldn't resolve the problem with C#, so we did it with a Python script.
... View more
01-30-2018
08:54 AM
|
0
|
1
|
1988
|
POST
|
I need to get some feature layers from a Web Map I created, using the ESRI JavaScript 3.x (it could be in any version while it's on the 3)
... View more
10-03-2017
06:49 AM
|
0
|
2
|
550
|
POST
|
Hi, I'm trying to attach a file to feature in a Esri Feature Service using the REST methods in a Visual Studio C# program, the feature already exist; so the next step as I understand is to call the "AddAttachment" method and pass the parameters, however I'm getting an error sending the file I want to attach, the error message says the following: {"error":{"code":500,"message":"com.esri.arcgis.discovery.json.JSONArray cannot be cast to com.esri.arcgis.discovery.json.JSONObject","details":[]}} The following is the method I'm using to call via POST the AddAttachment method: string POSTAttachment(string url, string jsonContent,string ruta, string nombre) { try { var aRespStr = ""; using (System.Net.WebClient client = new System.Net.WebClient()) { client.Headers["Content-type"] = "application/x-www-form-urlencoded"; client.Encoding = System.Text.Encoding.UTF8; var collection = new System.Collections.Specialized.NameValueCollection(); collection.Add("f", "json"); collection.Add("attachment", jsonContent); client.UploadFile(ruta, nombre); var response = client.UploadValues(url, "POST", collection); MemoryStream stream = new MemoryStream(response); StreamReader reader = new StreamReader(stream); aRespStr = reader.ReadToEnd(); } return aRespStr; } catch (Exception ex) { return ""; } } I'm calling the method in this way: string jsonAttachment = "[{\"attachment\":\"img.jpg\"}]"; string resultadoAttachment = POSTAttachment("http://crdes09:6080/arcgis/rest/services/Servicio_Prueba/Mapa_Control_Vectores_Movil_/FeatureServer/16/962/addAttachment", jsonAttachment, "C:\\img1.jpg", "img1.jpg"); My doubt is about how to embed the file into the call to the AddAttachment, is something i'm missing to do to solve this message about casting? I'll really appreciated any help.
... View more
03-22-2017
12:16 PM
|
0
|
7
|
4266
|
POST
|
Hi, I'm developing an add-in which backup ArcFM documents, once I have the ArcFM document I read their page layout (an simple ArcGis IPageLayout) and after that I have to save it in a mxd document. Since it's a batch process (I backup a lot of ArcFM documents in background) so I can't load the document to the ArcMap. I'm using the a MapDocument to create the mxd document and save it; however the Map Document's page layout property is read only. Is any way to set the Page Layout property in the Map Document? Thanks in advance
... View more
10-06-2014
02:12 PM
|
0
|
0
|
2595
|
POST
|
Hi, I'm developing an app with the ArcGis Mobile SDK which has to collect points and after that synchonize them. I have already the collecting point part now I have to synchronize but I can't. I'm using the Mobile Service Connection to the Mobile Cache and after creating the feature Sync Agent to sync the features, at the end with the Feature Sync Results I get on DataSizeSent a value of 2427 however on the layer I'm not getting the new features. This is the code: private bool DescargarBoletas(ESRI.ArcGIS.Mobile.FeatureCaching.MobileCache cache) { FeatureSource featureSource = null; MobileServiceConnection con = null; FeatureSyncAgent featureSyncAgent = null; try { //Get an access to the FeatureSource as well as the MobileServiceConnection featureSource = cache.FeatureSources["CAPA_BOLETAS_INFRACCION"] as FeatureSource; con = new MobileServiceConnection(); con.Url = @"http://crdes05:6080/arcgis/rest/services/MuniCartago/Prueba/MobileServer"; featureSyncAgent = new FeatureSyncAgent(featureSource, con); featureSyncAgent.SynchronizeAttachments = true; featureSyncAgent.SynchronizationDirection = SyncDirection.UploadOnly; if (featureSyncAgent.IsValid) { FeatureSyncResults synResults = (FeatureSyncResults)featureSyncAgent.Synchronize(); if (synResults.DataSizeSent > 0) return true; else return false; } else { return false; } }//fin try catch (Exception ex) { return false; } finally { featureSyncAgent.Dispose(); con.Dispose(); } } At the stack trace on the results I'm getting the following description: en System.Net.HttpWebRequest.finishGetResponse() en System.Net.HttpWebRequest.GetResponse() en ESRI.ArcGIS.Mobile.FeatureCaching.Synchronization.BinaryWebService.ExecuteRequest(Stream stream) en ESRI.ArcGIS.Mobile.FeatureCaching.Synchronization.MobileServiceConnection.ExecuteRequest(Stream requestStream) en ESRI.ArcGIS.Mobile.FeatureCaching.Synchronization.MapDocumentConnection.Execute(Stream requestStream) en ESRI.ArcGIS.Mobile.FeatureCaching.Synchronization.FeatureSyncAgent.UploadEditStream(Stream stream, Dictionary`2 gidFidDictionary, FeatureSyncResults results) en ESRI.ArcGIS.Mobile.FeatureCaching.Synchronization.FeatureSyncAgent.Upload(QueryFilter uploadFilter, FeatureSyncResults results) en ESRI.ArcGIS.Mobile.FeatureCaching.Synchronization.FeatureSyncAgent.Synchronize() en Boletas_Infraccion.geotecnologias.co.cr.util.SincronizacionCache.DescargarBoletas(MobileCache cache) en Boletas_Infraccion.geotecnologias.co.cr.util.SincronizacionCache.Sincronizar() en Boletas_Infraccion.Form_CargaDescargaDatos.uiButton_descargarBoletas_Click(Object sender, UIMouseEventArgs e) en Resco.UIElements.UIElement.OnClick(UIMouseEventArgs e) en Resco.UIElements.Controls.UIElementControl.OnMouseUp(MouseEventArgs e) en System.Windows.Forms.Control.WnProc(WM wm, Int32 wParam, Int32 lParam) en System.Windows.Forms.Control._InternalWnProc(WM wm, Int32 wParam, Int32 lParam) en Resco.UIElements.Internals.NativeMethods.CallWindowProcCE(IntPtr prevWndFunc, IntPtr hWnd, WM msg, Int32 wParam, Int32 lParam) en Resco.UIElements.Internals.NativeMethods.CallWindowProc(IntPtr prevWndFunc, IntPtr hWnd, WM msg, Int32 wParam, Int32 lParam) en Resco.UIElements.Controls.UIElementControl.NativeWndProc(IntPtr hWnd, WM msg, Int32 wParam, Int32 lParam) en Microsoft.AGL.Forms.EVL.EnterModalDialog(IntPtr hwnModal) en System.Windows.Forms.Form.ShowDialog() en Boletas_Infraccion.Form_Principal.menuItem_cargaDescarga_Click(Object sender, EventArgs e) en System.Windows.Forms.MenuItem.OnClick(EventArgs e) en System.Windows.Forms.Menu.ProcessMnuProc(Control ctlThis, WM wm, Int32 wParam, Int32 lParam) en System.Windows.Forms.Form.WnProc(WM wm, Int32 wParam, Int32 lParam) en System.Windows.Forms.Control._InternalWnProc(WM wm, Int32 wParam, Int32 lParam) en Microsoft.AGL.Forms.EVL.EnterMainLoop(IntPtr hwnMain) en System.Windows.Forms.Application.Run(Form fm) en Boletas_Infraccion.Program.Main() I attached 2 files first with the connection state on the wathc window, and the other one with the feature sync result on the watch window. Could someone tell me if I'm using correctly the feature synchronization or the reason I'm getting that "finishGetResponse()" when I try to sync? I Thanks in advance
... View more
04-08-2014
09:21 AM
|
0
|
1
|
3764
|
POST
|
Hi, i'm trying to call a route task on ArcGis Online with a token, however the parameter in the expiration's token is too short, as I investigated this time is on miliseconds and starts to run from january 1rst 1970; I'm getting on that parameter the following number: 1382489118263; so it finish more or less this year on september 21 invalidating my token. I'm using the following URL to create the token: https://www.arcgis.com/sharing/generateToken and the following parameters to request the token: *"request": "getToken" *"username": my user name on the ESRI global account *"password": my password on the ESRI global account *"referer": the URL of my web application, for example http://myserver/mywebapp *"expiration": "60" *"f": "json" requesting the response in jason format Can anybody tell me if there is something wrong?
... View more
10-22-2013
02:58 PM
|
0
|
0
|
529
|
POST
|
Hi, thanks by replying but I resolved the problem, I was using this code to license:
ESRI.ArcGIS.RuntimeManager.BindLicense(codigoProducto, nivelLicencia);
but replaced by this one and worked fine:
ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Desktop);
m_License = new AoInitializeClass();
m_License.Initialize(esriLicenseProductCode.esriLicenseProductCodeArcEditor);
Thank you again by reply
... View more
02-07-2013
05:21 AM
|
0
|
0
|
194
|
POST
|
I'm migrating some code which works fine on Windows Forms, but now in ASP.net I'm getting an error, I'm creating a version from one that already exist, the error says "The application is not licensed to perform this operation"; before execute the CreateVersion method I do the initialization of license and didn't get any error. Does someone know why the CreateVersion works on Windows Forms and not in ASP.net? Thanks in advance
... View more
02-06-2013
05:12 AM
|
0
|
2
|
2324
|
POST
|
I was trying to delete some graphics from my feature layer depending of one attribute, however when I loop on the graphics collection it says that have zero elements.
for (int i = flCalificacion.Graphics.Count - 1; i >= 0; i--)
{
grafico = flCalificacion.Graphics; //tomar el elemento gràfico
if (derroterosBorrar.Contains(grafico.Attributes["ASIENTO"].ToString())) //si tiene el mismo nùmero de presentaciòn
{
flCalificacion.Graphics.Remove(grafico); //eliminarlo
}//fin if
}//fin for
flCalificacion.SaveEdits();
I'm using the feature layer in Ondemand mode, should I use another one?, or there is another way to get the graphics collection from my feature layer to loop and delete it?. Any help will be appreciated
... View more
05-04-2012
08:11 AM
|
0
|
4
|
1237
|
POST
|
Thanks Jennifer, I'm getting all the columns now :o.
... View more
02-03-2012
05:12 PM
|
0
|
0
|
208
|
POST
|
Hi, I'm trying to read the properties of some features I insert before, but happends something strange, it's the following: if a read each property from the features in the layer I can read all the properties from the last one I insert, if I close my silverlight application and run again when I read the properties of the features I can read just some columns and not all of them cause it says are null, but I can see all the information from the arcmap viewing the featurelayer service . Could someone to tell me what could be the problem? the structure of my featurelayer is the following: OBJECTID (Tipo: esriFieldTypeOID, Alias: OBJECTID, Editable: False) ID (Tipo: esriFieldTypeString, Alias: ID, Longitud: 10, Editable: True) ASIENTO (Tipo: esriFieldTypeString, Alias: ASIENTO, Longitud: 12, Editable: True) INGRESO (Tipo: esriFieldTypeDate, Alias: INGRESO, Longitud: 36, Editable: True) TIPO_INGRESO (Tipo: esriFieldTypeString, Alias: REINGRESO, Longitud: 10, Editable: True) ANOTACIONES (Tipo: esriFieldTypeString, Alias: ANOTACIONES, Longitud: 100, Editable: True) NO_INSCRIPCION (Tipo: esriFieldTypeString, Alias: NO_INSCRIPCI??N, Longitud: 12, Editable: True) COORDENADA_NORTE (Tipo: esriFieldTypeDouble, Alias: COORDENADA_NORTE, Editable: True) COORDENADA_ESTE (Tipo: esriFieldTypeDouble, Alias: COORDENADA_ESTE, Editable: True) ESTADO (Tipo: esriFieldTypeString, Alias: ESTADO, Longitud: 1, Editable: True) ESTADO_CALIFICACION (Tipo: esriFieldTypeString, Alias: ESTADO_CALIFICACION, Longitud: 1, Editable: True) USUARIO_EDITA (Tipo: esriFieldTypeString, Alias: USUARIO_EDITA, Longitud: 20, Editable: True) FECHA_EDICION (Tipo: esriFieldTypeDate, Alias: FECHA_EDICI??N, Longitud: 36, Editable: True) REGISTRADOR (Tipo: esriFieldTypeString, Alias: REGISTRADOR, Longitud: 20, Editable: True) The code that i'm using to read the properties is this: foreach (Graphic graphic in flCalificacion.Graphics) { foreach (var f in flCalificacion.LayerInfo.Fields) { if (graphic.Attributes[f.Name] != null) MessageBox.Show(f.Name + ":" + graphic.Attributes[f.Name].ToString()); } } Where flCalificacion is my featurelayer. I'll appreciate any help
... View more
02-03-2012
09:43 AM
|
0
|
2
|
632
|
POST
|
Hi Jennifer, My code is working right now, the problem was the way I built the Graphic I was trying to insert. Thanks a lot
... View more
01-09-2012
10:23 AM
|
0
|
0
|
423
|
POST
|
Hi, I tested adding a feature using the editor (interactively) and worked correctly, so I discard the layer like the problem in my insertion, but while I was working with the editor I saw that the add button have a parameter, that let me especify the kind of feature I'm going to insert, and I would like to know if at the code that you gave me, I should specify in the same way the kind of feature that I'm going to insert before I use the add method. Thanks.
... View more
01-05-2012
12:53 PM
|
0
|
0
|
423
|
POST
|
Hi, I used the code you give me, but I'm still getting an error when I'm saving the edition, I don't know if there are another thing I should consider when I'm saving my edits, for example something like permissions, etc. Following I show you how I used the code: Here I get the feature layer after it is initialized and updated
private void Poligonos_UpdateCompleted(object sender, EventArgs e)
{
layerPoligonos = (FeatureLayer)sender;
}
After that I try to insert the new graphic and the attributes; I also checked the graphic had a correct geometry and symbol when I'm trying to insert into the feature layer
Graphic gra = null;
gra = VentanaDerroteroEnPanel.FinalizarDibujo();
foreach (var f in layerPoligonos.LayerInfo.Fields)
{
f (f.Editable)
{
switch(f.Name)
{
case "ID":
gra.Attributes[f.Name] = 205;
break;
case "Descripcion":
gra.Attributes[f.Name] = "prueba";
break;
}//fin switch
}
}
layerPoligonos.Graphics.Add(gra);
layerPoligonos.SaveEdits();
The error said "Unable to complete the operation", and have the code 400. Do you have any idea what could be the problem with the code? Thanks.
... View more
01-04-2012
10:43 AM
|
0
|
0
|
423
|
Online Status |
Offline
|
Date Last Visited |
03-06-2024
08:29 AM
|