POST
|
Hi Josh, Sorry for late acknowledgment but your suggestion works perfectly fine. Thanks Here is the code to help other developers: [featSafeguardDevt contains the features coming from ajax call to JSON service stored in database] //// ---------------Feature Layer Method---------------------------- lsSafeguardLayer.clear; map.graphics.clear; map.graphics.refresh(); //now go into each graphic layer and clear it var graphicLayerIds = map.graphicsLayerIds; var len = graphicLayerIds.length; for (var i = 0; i < len; i++) { var gLayer = map.getLayer(graphicLayerIds); //clear this Layer map.removeLayer(gLayer); } var extent = ""; for (var loop = 0; loop < featSafeguardDevt.length; loop++) { var featNewSite = featSafeguardDevt[loop]; if (featNewSite.attributes.APPL_SI_NO == appsino) { //create a feature collection for the rejected and selected site no. on dashboard var featureCollection = { "layerDefinition": null, "featureSet": { "features": [featNewSite], "geometryType": jsonSafeguardDevt.geometryType } }; featureCollection.layerDefinition = { "geometryType": jsonSafeguardDevt.geometryType, "objectIdField": "OBJECTID", "fields": jsonSafeguardDevt.fields, "spatialReference": jsonSafeguardDevt.spatialReference, "displayFieldName": jsonSafeguardDevt.displayFieldName }; //create a feature layer based on the feature collection lsSafeguardLayer = new esri.layers.FeatureLayer(featureCollection, { id: 'lsSafeguardLayer' }); lsSafeguardLayer.setEditable(false); map.addLayer(lsSafeguardLayer); lsSafeguardLayer.refresh(); if (lsSafeguardLayer.graphics[0]._extent != "") lsSafeguardLayer.graphics[0]._extent.spatialReference = map.spatialReference; map.setExtent(lsSafeguardLayer.graphics[0]._extent); break; } } //// ---------------Feature Layer Method END---------------------------- Thanks and Regards
... View more
01-27-2016
07:14 PM
|
0
|
0
|
626
|
POST
|
After compressing the fgdb , i am able to delete all lock files from fgdb folder but not only this one i.e. timestamps Thus, i am still unable to delete fgdb programatically. This is very weird now and it seems like some issue in arcgis itself. Regards
... View more
12-03-2015
11:21 PM
|
0
|
1
|
636
|
POST
|
Please help me out in this one. i am clearing workspace too but its not working.
... View more
12-03-2015
12:51 AM
|
0
|
2
|
636
|
POST
|
Thanks Jon for your prompt response... Yes, i have tried out all the ways but my design wants it to be non-resizable. I believe there is something which we can use to stop this resizing but unfortunately i am not able to find it out .... i still want to hear from someone , may be someone has came across this and resolved this. Best Regards
... View more
12-02-2015
06:37 PM
|
0
|
0
|
201
|
POST
|
Hi Jon, I dont know whether below screen will help you in defining my problem or not but still i want to share , please have a look. INITIAL LOAD: AFTER RESIZE: I want to stop this resizing . i want this dockable window to be fixed width .. Regards Saurabh
... View more
12-01-2015
06:49 PM
|
0
|
2
|
792
|
POST
|
Hi Jon, Thanks for replying but what do you mean by compressing the form? Regards Saurabh
... View more
12-01-2015
12:17 AM
|
0
|
4
|
792
|
POST
|
Thanks Again Josh!! I am working on it and will share the feedback once it is accomplished.. Regards
... View more
11-19-2015
01:33 AM
|
0
|
0
|
626
|
POST
|
Thanks Josh for your quick reply!! I believe i want something different than this . As i said i have converted complete feature class to JSON and store as a BLOB. Now , on the web when i am retrieving this BLOB and converting back to JSON i am getting following output : SO HOW CAN I CONVERT IT BACK TO FEATURE CLASS AND ADD AS A LAYER USING ARCGIS JAVASCRIPT??? {\"displayFieldName\":\"\",\"fieldAliases\":{\"OBJECTID\":\"OBJECTID\",\"APPL_SI_NO\":\"Application Site Number\",\"CREATE_BY\":\"Created By\",\"CREATE_DT\":\"Created Date\",\"LST_MDF_BY\":\"Last Modified By\",\"LST_MDF_DT\":\"Last Modified Date\",\"SYSTEM_ID\":\"System ID\",\"SGDP_AREA\":\"SGDP AREA\",\"GLOBALID\":\"GLOBALID\",\"Shape_Length\":\"Shape_Length\",\"Shape_Area\":\"Shape_Area\"},\"geometryType\":\"esriGeometryPolygon\",\"spatialReference\":{\"wkid\":3414,\"latestWkid\":3414},\"fields\":[{\"name\":\"OBJECTID\",\"type\":\"esriFieldTypeOID\",\"alias\":\"OBJECTID\"},{\"name\":\"APPL_SI_NO\",\"type\":\"esriFieldTypeString\",\"alias\":\"Application Site Number\",\"length\":25},{\"name\":\"CREATE_BY\",\"type\":\"esriFieldTypeString\",\"alias\":\"Created By\",\"length\":100},{\"name\":\"CREATE_DT\",\"type\":\"esriFieldTypeDate\",\"alias\":\"Created Date\",\"length\":8},{\"name\":\"LST_MDF_BY\",\"type\":\"esriFieldTypeString\",\"alias\":\"Last Modified By\",\"length\":100},{\"name\":\"LST_MDF_DT\",\"type\":\"esriFieldTypeDate\",\"alias\":\"Last Modified Date\",\"length\":8},{\"name\":\"SYSTEM_ID\",\"type\":\"esriFieldTypeString\",\"alias\":\"System ID\",\"length\":20},{\"name\":\"SGDP_AREA\",\"type\":\"esriFieldTypeDouble\",\"alias\":\"SGDP AREA\"},{\"name\":\"GLOBALID\",\"type\":\"esriFieldTypeGlobalID\",\"alias\":\"GLOBALID\",\"length\":38},{\"name\":\"Shape_Length\",\"type\":\"esriFieldTypeDouble\",\"alias\":\"Shape_Length\"},{\"name\":\"Shape_Area\",\"type\":\"esriFieldTypeDouble\",\"alias\":\"Shape_Area\"}],\"features\":[{\"attributes\":{\"OBJECTID\":1,\"APPL_SI_NO\":\"0000/3916/0001\",\"CREATE_BY\":\" \",\"CREATE_DT\":-2209161600000,\"LST_MDF_BY\":\" \",\"LST_MDF_DT\":-2209161600000,\"SYSTEM_ID\":\" \",\"SGDP_AREA\":null,\"GLOBALID\":\"{9B397F6B-20E4-4146-99BB-1CB9264E49EB}\",\"Shape_Length\":18820.957758541444,\"Shape_Area\":13935394.100851806},\"geometry\":{\"rings\":[[[13204.61360000167,23092.193700008094],[18754.114800002426,26549.260000005364],[21217.413772959262,23061.559098981321],[13204.61360000167,23092.193700008094]]]}},{\"attributes\":{\"OBJECTID\":2,\"APPL_SI_NO\":\"1997/0335/0001\",\"CREATE_BY\":\" \",\"CREATE_DT\":-2209161600000,\"LST_MDF_BY\":\" \",\"LST_MDF_DT\":-2209161600000,\"SYSTEM_ID\":\" \",\"SGDP_AREA\":null,\"GLOBALID\":\"{547D35A7-6749-4C4E-B17C-96FB8E21A6E4}\",\"Shape_Length\":28665.246133473382,\"Shape_Area\":31852909.191307254},\"geometry\":{\"rings\":[[[49097.27291581966,37636.009742863476],[54507.458400003612,42378.984600001946],[53737.337799999863,29928.675600003451],[49097.27291581966,37636.009742863476]]]}}]} Thanks and Regards
... View more
11-15-2015
06:51 PM
|
0
|
2
|
626
|
POST
|
Hello Everyone, I need a help on rendering. I am working on following workflow and achieved half way mark but stuck at below point: 1) using arcobjects i am able to convert featureclass to JSON and finally store as a BLOB in oracle database. 2) Now , over the web module i am able to get back the data as a JSON but unable to render this back to feature class to add as a layer on web [I want this to be done using arcgis api's for javascript] Any suggestions would be highly appreciated. Thanks and Regards
... View more
11-13-2015
01:26 AM
|
0
|
5
|
2913
|
POST
|
Hello Everyone, I need a quick help on stop resizing of dockable window. I have added WPF user control as a child to this esri dockable window and i want user cannot resize this on arcmap. It should be of fixed width. How can i achieve the same ? Here is the code for reference public class AddinImpl : ESRI.ArcGIS.Desktop.AddIns.DockableWindow { private System.Windows.Forms.Integration.ElementHost m_windowUI; public AddinImpl() { } protected override IntPtr OnCreateChild() { m_windowUI = new System.Windows.Forms.Integration.ElementHost(); m_windowUI.Child = new dckSafeDevt(); //m_windowUI.MaximumSize = new System.Drawing.Size(305, 500); return m_windowUI.Handle; } protected override void Dispose(bool disposing) { if (m_windowUI != null) m_windowUI.Dispose(); base.Dispose(disposing); } } dckSafeDevt is the xaml usercontrol. Regards
... View more
11-02-2015
07:04 PM
|
0
|
0
|
2300
|
POST
|
Hi, Anyone from arcobjects can suggest something on this please . Have anyone done anything similar like this? Regards
... View more
10-28-2015
07:22 PM
|
0
|
0
|
792
|
POST
|
Hi Duncan, Thanks for prompt reply!! Second set of options i have tried because i read in other threads that compacting fgdb will clear lock files and help in deleting fgdb but in actual it is too not happening so i completely lost. As per your suggestions i am clearing all objects as far it is possible but still no help. I feel until arcmap is not closed and open it is not clearing link with fgdb. Please suggest any other way out. Regards Saurabh
... View more
10-28-2015
07:17 PM
|
0
|
0
|
636
|
POST
|
G'Day Everyone, I am facing issues on deleting fgdb, scenario is like this : " i have created fgdb programatically and loaded to TOC of ArcMap, after completion of work i want TOC to be clear and fgdb to be deleted but it is throwing an error" The reason behind error is that fgdb is not released since arcmap is not closed. how to overcome this issue? i am using following code to delete , please suggest if (IO.Directory.Exists(iPLANConstants.strLSFGDBKeyPath + @"\" + clsLandSafeguarding.strDraftNameGlobal + ".gdb")) { ArcMap.Document.FocusMap.ClearLayers(); ArcMap.Document.ActiveView.ContentsChanged(); ArcMap.Document.ActiveView.Refresh(); string toolboxLoc = iPLANConstants.Instance.appconfig["dmtbx"].ToString(); try { Geoprocessor gpProcess = new Geoprocessor(); IGeoProcessor2 gp = new GeoProcessorClass(); IVariantArray parameters = new VarArray(); parameters.Add(iPLANConstants.strLSFGDBKeyPath + @"\" + clsLandSafeguarding.strDraftNameGlobal + ".gdb"); try { gp.AddToolbox(toolboxLoc); // toolboxLox is correct gp.Execute("Delete_management", parameters, null); gp.RemoveToolbox(toolboxLoc); log.Info(gp.GetMessage(0)); gp.ClearMessages(); gp = null; } catch (Exception gpEx) { } Also tried below options but no success in deleting but no error also string[] lockfiles = Directory.GetFiles(FileGDBLoc, "*.lock"); if (lockfiles.Length > 0) { //OPTION1 //ESRI.ArcGIS.DataManagementTools.Compact compactProcess = new ESRI.ArcGIS.DataManagementTools.Compact(); //compactProcess.in_workspace = FileGDBLoc; //gpProcess.Execute(compactProcess as IGPProcess, null); //OPTION2 //FileGDBWorkspaceFactory pWorkspaceFactory = default(FileGDBWorkspaceFactory); //IWorkspace pWorkspace = default(IWorkspace); //pWorkspaceFactory = new ESRI.ArcGIS.DataSourcesGDB.FileGDBWorkspaceFactory(); //pWorkspace = pWorkspaceFactory.OpenFromFile(FileGDBLoc, 0); //IDatabaseCompact databaseCompact; //if (typeof(ESRI.ArcGIS.Geodatabase.IDatabaseCompact) == pWorkspace) //{ // databaseCompact = (IDatabaseCompact)pWorkspace; // if (databaseCompact.CanCompact()) // { // databaseCompact.Compact(); // } //} //else //{ // Console.WriteLine("The workspace does not support IDatabaseCompact"); //} }
... View more
10-22-2015
02:01 AM
|
0
|
6
|
3308
|
Title | Kudos | Posted |
---|---|---|
1 | 04-20-2015 11:31 PM | |
1 | 02-13-2015 07:32 AM | |
1 | 07-20-2015 03:57 AM | |
1 | 06-25-2015 02:45 AM | |
1 | 09-29-2015 08:43 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|