|
POST
|
Hi Fossi, You should read this topic about Using feature templates. Basically you will use IEditor3.RemoveAllTemplatesInMap Method to remove all existing layer templates and then start adding your template(s) via IEditor3.AddTemplates Method. Quick Sample:
private void FilterEditTemplates()
{
try
{
//Start an edit session on the workspace holding the feature class.
IWorkspace editWorkspace = GetWorkspace() as IWorkspace;
ESRI.ArcGIS.esriSystem.UID editorUid = new ESRI.ArcGIS.esriSystem.UID();
editorUid.Value = "esriEditor.Editor";
ESRI.ArcGIS.Editor.IEditor3 m_editor = ArcMap.Application.FindExtensionByCLSID(editorUid) as ESRI.ArcGIS.Editor.IEditor3;
m_editor.StartEditing(editWorkspace);
//Remove All Existing Templates
m_editor.RemoveAllTemplatesInMap(ArcMap.Document.FocusMap);
//Get your edit layer (Layer belongs to edit workspace)
ILayer editLayer = GisHelper.GetLayerByName("YourLayerName");
//Make new template
IEditTemplateFactory editTemplateFact = new EditTemplateFactoryClass();
IEditTemplate newEditTemplate = editTemplateFact.Create("MyTemplateName", editLayer);
//Add the template to editor.
IArray templateArray = new ArrayClass();
templateArray.Add(newEditTemplate);
m_editor.AddTemplates(templateArray);
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
Regards, Ahmed
... View more
05-28-2014
10:34 PM
|
1
|
0
|
1922
|
|
POST
|
You should put your Reports in the ASP web site and then call the report page from silverlight with your parameters and data. Check the following: http://shohel-silverlight.blogspot.com/2013/02/crystal-report-in-silverlight-5.html
http://www.global-webnet.net/blogengine/post/2009/01/06/Running-Crystal-Reports-from-Silverlight.aspx
... View more
05-26-2014
10:41 PM
|
0
|
0
|
288
|
|
POST
|
try to convert it to string first
wheresatz=""" "CLAVE" = """ + + str(nummapa)
... View more
05-15-2014
01:58 AM
|
0
|
0
|
828
|
|
POST
|
Thematic map sample just depends on a feature layer so you can make a user control in a separate class library (may contains all your reusable controls) and on Feature Layer initialized event pass the feature layer to your control and this should work fine. Check attached sample (API 3.1 + SL5). Regards, Ahmed
... View more
05-14-2014
01:56 AM
|
0
|
0
|
517
|
|
POST
|
Try This Zoom Method, Use it in the previous sample and enhance it according to your business.
private void ZoomToGraphic()
{
if (activeGraphic != null && activeGraphic.Geometry != null)
{
var graphicExtent = activeGraphic.Geometry.Extent;
var mapExtent = MyMap.Extent;
double mapExtentWidth = mapExtent.XMax - mapExtent.XMin;
double mapExtentHeight = mapExtent.YMax - mapExtent.YMin;
if (MyMap.Rotation != 0)
{
mapExtentHeight = mapExtent.XMax - mapExtent.XMin;
mapExtentWidth = mapExtent.YMax - mapExtent.YMin;
}
//Just Center the map to your graphic
MyMap.PanTo(graphicExtent.GetCenter());
//Zoom using factor.
double xRatio = mapExtentWidth / graphicExtent.Width;
double yRatio = mapExtentHeight /graphicExtent.Height;
MyMap.Zoom(xRatio > yRatio ? yRatio : xRatio);
}
} Regards,
... View more
05-13-2014
06:18 AM
|
0
|
0
|
1544
|
|
POST
|
Use str.lstrip([chars]) in Python Expression. you can pass chars parameter as you like. In case of leading space it will be !YourField!.lstrip(' ') Something like this: import arcpy
from arcpy import env
env.workspace = "C:/data"
arcpy.AddField_management("vegtable.dbf", "VEG_TYP2", "TEXT", "", "", "20")
arcpy.CalculateField_management("vegtable.dbf", "VEG_TYP2",
'!Name!.lstrip(' ')', "PYTHON") More Info: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00170000004m000000 Regards,
... View more
05-12-2014
01:51 AM
|
0
|
0
|
4017
|
|
POST
|
Hi all, Any way to drag a layer from the TOC and drop it into a combobox on a form? As the image below, I created a dockable window where I have two comboboxes: I want to populate the 1st one with the dropped layer name and the second one with the fields of that layer. [ATTACH=CONFIG]33696[/ATTACH] I found an interesting post which explains how to do this. http://kiwigis.blogspot.com/2011/07/how-to-create-drop-target-for-layers-in.html Basically you will deserialize drooped object which is packaged as "ESRI Layers" and then add it to your Combobox. I have attached sample code using 10.1 SDK Regards,
... View more
05-11-2014
01:18 AM
|
1
|
1
|
624
|
|
POST
|
It will be a good start if you use one of these templates made by esri https://github.com/Esri/arcgis-templates-silverlight
... View more
05-07-2014
09:59 AM
|
0
|
0
|
517
|
|
POST
|
Hi Saurabh, Can you post the link of your template so I can know how the widgets is implemented?
... View more
05-06-2014
02:57 AM
|
0
|
0
|
517
|
|
POST
|
thank you, the question is it possible to combine that sample with spatial Query sample. of course you can, you should just break them down: 1-Draw on Map. 2-If user enters buffer value Apply buffer on drawn geometry. 3-After buffer completed Apply Spatial Filter with buffer geometry. I attached some code for the concept. Regards,
... View more
05-06-2014
02:28 AM
|
0
|
0
|
644
|
|
POST
|
If you have access to your map server you can increase MaxImageHeight and MaxImageWidth config values for your service. The default is 2048 x 2048. By changing these values you will increase image size the map service will export and this will resolve your issue. I tested it and it works fine. Check the following posts for more info: http://forums.arcgis.com/threads/8726-Magnifier-Bug http://forums.arcgis.com/threads/82705-Maximum-screen-resolution-map-not-loading-on-large-monitor Regards,
... View more
05-05-2014
10:19 PM
|
0
|
0
|
633
|
|
POST
|
Hi Dan, Referencing to this post your magnified map size (Resolution) is multiplied by your Zoom Factor and this may cause some errors for your layer. I tested your code and it shows the layer if you change map size and zoom factor. Regards,
... View more
05-05-2014
03:20 AM
|
0
|
0
|
633
|
|
POST
|
Hello I am new to Silverlight development. I am trying to to create a thematic mapping userControl in my Silverlight application. Can anyone help me in this regard. How to add a thematic usercontrol step by step. Thanks and regards Saurabh Hi Saurabh, You can check Dynamic Layer Thematic sample from the following URL: https://developers.arcgis.com/silverlight/sample-code/start.htm#DynamicLayerThematic Regards,
... View more
05-05-2014
12:02 AM
|
0
|
0
|
360
|
|
POST
|
There is already sample for Querying using buffer. You just need to add a textbox to get your buffer distance. Regards,
... View more
05-04-2014
09:24 PM
|
0
|
0
|
644
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-22-2015 06:50 AM | |
| 1 | 04-01-2014 10:01 PM | |
| 1 | 04-07-2014 11:18 PM | |
| 1 | 04-08-2014 09:19 PM | |
| 1 | 11-26-2014 07:46 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:24 AM
|