|
POST
|
You could use a non-secured service for editor tracking. As Dan mentioned there will be no user name for creator/editor fields. CreatedOn and EditedOn edit tracking fields will get value anytime a new feature is created or edited. And yes if you want to have user's email then you should have a field in you database that can be used for accepting email. Lets say you have an email-id of the logged in user then you before saving the edits you can simply add to the attribute in the code behind.
... View more
08-02-2012
09:14 AM
|
0
|
0
|
1037
|
|
POST
|
private void locateFeature(Selection sel)
{
string serviceURL;
if (GravityMain.Target == PipeQueryBuilder.AddIns.MyDatabaseService.Table.SSGRAVITYMAIN_MV)
serviceURL = "http://whatever/";
else if (GravityMain.Target == PipeQueryBuilder.AddIns.MyDatabaseService.Table.SSPRESSURIZEDMAIN_MV)
serviceURL = "http://whatever/";
else if (GravityMain.Target == PipeQueryBuilder.AddIns.MyDatabaseService.Table.SWGRAVITYMAIN_MV)
serviceURL = "http://whatever/";
else
serviceURL = "http://whatever/";
// Query task initialization.
QueryTask queryTask = new QueryTask(serviceURL);
queryTask.ExecuteCompleted += QueryTask_ExecuteCompleted;
queryTask.Failed += QueryTask_Failed;
// Query task parameters. Return geometry,
Query query = new Query();
query.ReturnGeometry = true;
query.OutFields.Add("*");
query.Where = constructWHERECLAUSE(sel);
queryTask.ExecuteAsync(query);
}
public string constructWHERECLAUSE(Selection sel)
{
string whereclause = string.Empty;
whereclause += "PIPEMATERIAL = " + "'" + sel.PipeMaterial + "'" + " AND WIDTH IN (" + GravityMain.conCatSizes(sel) + ")";
whereclause += " and status = 1 ";
if (sel.Owner != 0)
whereclause += " and ptable.ownership = " + "'" + sel.Owner + "'";
if (sel.SubType != 0)
whereclause += " and subtype = " + "'" + sel.SubType + "'";
if (sel.Rehab != "ALL")
whereclause += " and rehabtype = " + "'" + sel.Rehab + "'";
if (sel.SanitaryOption != SanitaryOptions.NOT_SANITARY)
if (sel.SanitaryOption == SanitaryOptions.COMBINED)
whereclause += " and ((SUBSTR(FACILITYID, 19, 1) = 'C') or (SUBSTR(FACILITYID, 21, 1) = 'C'))";
else if (sel.SanitaryOption == SanitaryOptions.SANITARY)
whereclause += " and ((SUBSTR(FACILITYID, 19, 1) = 'S') or (SUBSTR(FACILITYID, 21, 1) = 'S'))";
return whereclause;
}
Can I use QueryTask Where clause like in the code above? The above code works but it appears that it does not return all the features on the map that meets the SQL criteria. My only reasonable suspicion is that the QueryTask where clause gets confused when it sees the SUBSTR( ). I am not sure because the code runs fine with no exceptions or compile error. The only thing is that it does not return all the features that meets the SQL criteria and other times it does return all the features that matches the SQL criteria. Does anyone have any suggestion that might be helpful. I need help with this. Thanks in Advance. It may be related to maximum records returned by the server. For e.g if max # of features returned is set 1000 for the service and query leads to more than 1000 features then only 1000 will be drawn/rendered. An easy way to test would be to use the SQL where clause using service rest end point and see how many records you get.
... View more
08-02-2012
09:05 AM
|
0
|
0
|
3549
|
|
POST
|
If I understood it right, you are trying to initiate another edition action when condition in EditorWidget_EditCompleted is true. If that's correct then changing the editor action is not exposed via EditorWidget. You need more granular control on edit actions and hence should use Editor which is more granular. Something like this... Also see sample in link below on how to set up Editor http://resources.arcgis.com/en/help/silverlight-api/samples/start.htm#EditToolsExplicitSave void editor_EditCompleted(object sender,Editor.EditEventArgs e) { FeatureLayer horizontalWellCap = TabletMap.Layers["1"] as FeatureLayer; FeatureLayer horizontalwellLateral = TabletMap.Layers["2"] as FeatureLayer; if (e.Action == Editor.EditAction.Add) { foreach (Editor.Change change in e.Edits) { if (change.Layer != null && change.Layer == horizontalWellCap && change.Graphic != null) { if (editor.Select.CanExecute("new")) editor.Select.Execute("new"); } } } } Hope this helps..
... View more
08-01-2012
05:04 PM
|
0
|
0
|
1371
|
|
POST
|
Hi all Anyone copy/pasted a polygon from one layer to another using Silverlight thanks This can be done using silverlight too. However you cannot directly add a graphic from one layer to another. You would need to clone the geometry and copy over attributes from LayerAGraphic to LayerBGraphic. Grpahic LayerBGraphic; = new Graphic(); LayerBGraphic.Geometry=ESRI.ArcGIS.Client.Geometry.Geometry.Clone(layerAGraphic.Geometry); foreach (var attrib in layerAGraphic.Attributes) { LayerBGraphic.Attributes[attrib.Key] = attrib.Value; }
... View more
07-30-2012
10:53 AM
|
0
|
0
|
557
|
|
POST
|
Add "using System.Linq;" to list of namespaces in the codebehind.
... View more
07-30-2012
10:32 AM
|
0
|
0
|
1558
|
|
POST
|
Hi, Can you please elaborate on "when I go to print, it only shows up in black and white". Does the entire map shows black/white , including the basemap? or only Graphics are printed in black and white.Can you provide your XAML? Side note, The export web map task cannot print not any custom symbols. If there are any custom symbols for e.g. symbols using storyboards/gradients etc are downgraded to black point circle/line/polygon based on geometry type. --Preeti
... View more
07-27-2012
01:44 PM
|
0
|
0
|
1900
|
|
POST
|
Hi , I don't see any techinical issue in what you are doing. I tried both of your usecases on http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/operations/FeatureServer/2 and didn't run into any issue. Both cases were successful. For updating I did (MyMap.Layers[1] as FeatureLayer).SelectedGraphics.ToList()[0].Geometry = null; And for adding a new feature, private void Button_Click(object sender, RoutedEventArgs e) { Graphic g = new Graphic(); g.Attributes["collection_time"] = DateTime.Now; g.Attributes["description"] = "Empty Shape"; (MyMap.Layers[1] as FeatureLayer).Graphics.Add(g); } Try a simple usecase using service above and let us know if you find any problem.
... View more
07-26-2012
09:25 AM
|
0
|
0
|
1411
|
|
POST
|
Magnifier actually makes the request to the map service or featurelayer service and gets the features. If the same service is added on the map and has some selections or custom symbology, magnifier cannot display it because it is not requesting image off a map. It will display the layer with default renderer/symbol or whatever comesback as part of layer info. Botton line is , I think it is not possible.
... View more
07-13-2012
03:22 PM
|
0
|
0
|
692
|
|
POST
|
Yes until layer is intialzed you can't get its info. So code will look like : public Test() { InitializeComponent(); FeatureLayer fl = new FeatureLayer(); fl.Url ="http://services.arcgisonline.com/ArcGIS/rest/services/Demographics/USA_Average_Household_Size/MapServer/1"; fl.Initialized += fl_Initialized; fl.Initialize(); } void fl_Initialized(object sender, System.EventArgs e) { // you can get layerinfo here }
... View more
07-13-2012
03:06 PM
|
0
|
0
|
1623
|
|
POST
|
Hi, Thats simple , all you need is to template symbolmaker symbol. For e.g. the symbol you want can be drawn using following code: <esri:SimpleMarkerSymbol x:Key="RedMarkerSymbol"> <esri:SimpleMarkerSymbol.ControlTemplate> <ControlTemplate> <Ellipse Fill="LightBlue" Stroke="Black" Width="15" Height="15"/> </ControlTemplate> </esri:SimpleMarkerSymbol.ControlTemplate> </esri:SimpleMarkerSymbol>
... View more
07-13-2012
02:51 PM
|
0
|
0
|
1536
|
|
POST
|
Silverlight viewer has not been updated to use Silverlight API 3.0. It is coming in very near future though..:-)
... View more
07-12-2012
04:28 PM
|
0
|
0
|
955
|
|
POST
|
Actually you can do it. I haven't tested it but should work. Subscribe to MouseEnter="FeatureLayer_MouseEnter" private void FeatureLayer_MouseEnter(object sender, GraphicMouseEventArgs e) { MyDataGrid.ScrollIntoView(e.Graphic,null); }
... View more
07-12-2012
04:19 PM
|
0
|
0
|
650
|
|
POST
|
After all layers are removed and new layers are added you would need to reset the map's extent to extent of all layers. Try this MyMap.Extent=MyMap.Layers.GetFullExtent();
... View more
07-12-2012
04:10 PM
|
0
|
0
|
993
|
|
POST
|
Custom Symbols and Rendererer are not supported by Rest API at 10.1. Hence the API downgrades any custom symbols/Renderers to the base type with black color. Note, In a graphicslayer if a custom symbol is found even for one graphic, all symbols are downgraded for that layer. For e.g the symbol below would be printed as black point <esri:SimpleRenderer x:Key="YellowMarkerRenderer"> <esri:SimpleRenderer.Symbol> <esri:SimpleMarkerSymbol Size="20"> <esri:SimpleMarkerSymbol.Color> <RadialGradientBrush> <GradientStop Color="Yellow" Offset="0.578"/> <GradientStop Color="#FF0E0D07" Offset="1"/> </RadialGradientBrush> </esri:SimpleMarkerSymbol.Color> </esri:SimpleMarkerSymbol> </esri:SimpleRenderer.Symbol> </esri:SimpleRenderer>
... View more
07-12-2012
04:06 PM
|
0
|
0
|
4007
|
|
POST
|
The API does have a property called GeometryType on LayerInfo. You don't need a webclient request to get this property. Basically when the Featurelayer is initialized you can get it like this: private void FeatureLayer_Initialized(object sender, System.EventArgs e) { if ((sender as FeatureLayer).LayerInfo.GeometryType == GeometryType.Polygon) { // do something } }
... View more
07-12-2012
03:52 PM
|
0
|
0
|
1623
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-11-2025 03:29 PM | |
| 2 | 09-04-2025 04:44 PM | |
| 1 | 04-14-2025 10:39 AM | |
| 1 | 12-17-2024 01:28 PM | |
| 1 | 01-16-2025 02:56 PM |
| Online Status |
Offline
|
| Date Last Visited |
3 weeks ago
|