|
POST
|
You can set GraphicsLayer.ProjectionService as seen in this SDK sample (see XAML-code): Auto-Project. WebMercator can only be used for converting geometries between Bing Maps WebMercator projection (SRID=3857) and WGS84 Geographic coordinate system (SRID=4326).
... View more
10-11-2012
11:24 AM
|
0
|
0
|
1275
|
|
POST
|
Thank you for reporting this bug. We'll try to get it fixed in future release. As of now, our API does not seem to raise Hold on MapGesture. You may want to use UIElement.ManipulationDelta event directly to detect a Tap and Hold gesture.
... View more
09-24-2012
09:49 AM
|
0
|
0
|
853
|
|
POST
|
FeatureLayer has a GdbVersion property, which allows you to view/edit a specific geodatabase version. You can use any of the editing tools from Editor to EditorWidget if you wanted the geometry edits to be done interactively. You can also use EditGeometry, if you want more control of when edits are started/completed. If you will be working with point geometry, the EditGeometry sample demonstrates how this can be done outside EditGeometry. graphic.Geometry = new MapPoint(newX, newY, spatialRef); You can also use GeometryService or WebMercator (depending on layer and map spatial reference) toproject X,Y input values to your feature service spatial reference.
... View more
08-17-2012
09:11 AM
|
0
|
0
|
702
|
|
POST
|
In addition to Preeti's post, PrintTask in v3.0 can only support symbols and renderers the REST API support: symbols and renderers. If you don't want the symbols to be downgraded to black, you can create a symbol class that implements INotifyPropertyChanged. For example, if you are using StrobeMarkerSymbol from this SDK sample: custom symbols, you can reference this MarkerSymbol instead, it would still be SimpleMarkerSymbol but you can atleast update Color, Size, Style to make it look similar to your animated/custom symbol.
public class MarkerSymbol : ESRI.ArcGIS.Client.Symbols.MarkerSymbol, IJsonSerializable
{
private SimpleMarkerSymbol sms;
public MarkerSymbol()
{
sms = new SimpleMarkerSymbol() { Color = new SolidColorBrush(Colors.Red) };
}
public string ToJson()
{
return sms.ToJson();
}
}
... View more
08-08-2012
10:06 AM
|
0
|
0
|
1865
|
|
POST
|
You can create a custom symbol that inherits from MarkerSymbol and add an enum property for Style. You can define your symbol templates as resource and choose the appropriate one based on Style. If you want to build the ControlTemplate itself in code, I think you can follow this approach: http://blogs.silverlight.net/blogs/msnow/archive/2008/10/09/silverlight-tip-of-the-day-60-how-to-load-a-control-straight-from-xaml.aspx. So create a default template string and use string.Format() to replace Path, then use XamlReader.Load to set ControlTemplate.
... View more
08-08-2012
09:54 AM
|
0
|
0
|
419
|
|
POST
|
This is the intended design for FeatureDataGrid, that it would share the SelectedGraphics with its associated GraphicsLayer, which means, selected graphic means selected row, thus you see SelectionChanged event firing. If you need this changed, you can download source code: http://esrisilverlight.codeplex.com/, you can ignore calls to RestorePreviousSelection() method, this method is being used to synchronize the layer and the datagrid.
... View more
08-08-2012
09:40 AM
|
0
|
0
|
1446
|
|
POST
|
The same description for layer applies even on dynamic ones: http://resources.arcgis.com/en/help/silverlight-api/apiref/api_start.htm?ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Layer.html. ArcGISDynamicMapServiceLayer with dynamicLayers, will perform the rendering on the server-end and return you an image on-the-fly. FeatureLayer with dynamic source, will still return you the features, their geometry and attributes and apply the renderer on client. I guess it depends where you want the processing to take place, if you need the features available on the client then go with FeatureLayer. BTW, Dominique, great samples! 🙂
... View more
08-08-2012
09:01 AM
|
0
|
0
|
996
|
|
POST
|
This might help: http://msdn.microsoft.com/en-us/library/cc189066(v=vs.95).aspx
... View more
08-08-2012
08:42 AM
|
0
|
0
|
706
|
|
POST
|
You would need to create another Graphic that clones original Graphic's geometry and copies original Graphic's Attributes. For example, you can subscribe to the source layer's MouseLeftButtonDown
private void GraphicsLayer_MouseLeftButtonDown(object sender, GraphicMouseButtonEventArgs e)
{
var l = MyMap.Layers["DestinationLayer"] as GraphicsLayer;
// This code clones the geometry (i.e. Polygon)
var g = new Graphic() { Geometry = Geometry.Clone(e.Graphic.Geometry) };
// This code clones the attributes.
foreach (var item in g.Attributes)
g.Attributes[item.Key] = item.Value;
l.Graphics.Add(g);
}
... View more
08-07-2012
04:39 PM
|
0
|
0
|
424
|
|
POST
|
I can't seem to reproduce with the following sample code. In this sample, I am using GraphicsLayer, where FeatureLayer inherits from. I also use InfoWindow with HyperlinkButton with Content and NavigateUri pointed to the attribute that contains URL. I'm using Initialized event handler to add this link URL attribute to my graphic. XAML-code:
<Grid.Resources>
<esri:SimpleMarkerSymbol x:Key="BlueMarkerSymbol"
Color="Blue"
Size="12"
Style="Circle" />
<DataTemplate x:Key="MyFeatureLayerInfoWindowTemplate">
<HyperlinkButton Content="{Binding [linkURL]}"
NavigateUri="{Binding [linkURL]}"
TargetName="_blank"
FontSize="12" />
</DataTemplate>
</Grid.Resources>
<esri:Map x:Name="MyMap">
<esri:ArcGISTiledMapServiceLayer Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer" />
<esri:GraphicsLayer ID="MyLayer"
Initialized="GraphicsLayer_Initialized"
MouseLeftButtonUp="GraphicsLayer_MouseLeftButtonUp">
<esri:Graphic Symbol="{StaticResource BlueMarkerSymbol}">
<esri:MapPoint X="-140.9"
Y="63.391">
<esri:Geometry.SpatialReference>
<esri:SpatialReference WKID="4326" />
</esri:Geometry.SpatialReference>
</esri:MapPoint>
</esri:Graphic>
</esri:GraphicsLayer>
</esri:Map>
<esri:InfoWindow x:Name="MyInfoWindow"
Padding="2"
CornerRadius="20"
Background="LightSalmon"
Map="{Binding ElementName=MyMap}"
ContentTemplate="{StaticResource MyFeatureLayerInfoWindowTemplate}"
MouseLeftButtonUp="MyInfoWindow_MouseLeftButtonUp" />
</Grid>
Code-behind
private void GraphicsLayer_Initialized(object sender, EventArgs e)
{
var l = sender as GraphicsLayer;
foreach (var g in l.Graphics)
g.Attributes["linkURL"] = new Uri("http://resources.arcgis.com/en/help/silverlight-api/samples/start.htm");
}
private void GraphicsLayer_MouseLeftButtonUp(object sender, GraphicMouseButtonEventArgs e)
{
MyInfoWindow.Anchor = MyMap.ScreenToMap(e.GetPosition(MyMap));
MyInfoWindow.IsOpen = true;
MyInfoWindow.Content = e.Graphic.Attributes;
}
private void MyInfoWindow_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
MyInfoWindow.IsOpen = false;
}
... View more
08-07-2012
04:13 PM
|
0
|
0
|
522
|
|
POST
|
It seems your geoprocessor requires another parameter with name "Input_Features" that is missing in your application. Illegal ring value sound like one of the parameters sent was a TextBox?
... View more
08-07-2012
03:53 PM
|
0
|
0
|
593
|
|
POST
|
If this is an image service, you might want to use ImageServiceIdentifyTask instead http://resources.arcgis.com/en/help/silverlight-api/apiref/api_start.htm?ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Tasks.ImageServiceIdentifyTask.html, where you would be specifying the following parameters: http://resources.arcgis.com/en/help/silverlight-api/apiref/api_start.htm?ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Tasks.ImageServiceIdentifyTask.html
... View more
08-07-2012
03:42 PM
|
0
|
0
|
702
|
|
POST
|
The ChildWindow contains FeatureDataForm. You can provide an implicit style that targets FeatureDataForm in your App.xaml. This style should be applied when you click on Display attributes button from EditorWidget.
... View more
08-07-2012
03:37 PM
|
0
|
0
|
541
|
|
POST
|
You can use the following SDK sample: http://resources.arcgis.com/en/help/silverlight-api/samples/start.htm#HeatMapLayerSimple
... View more
08-07-2012
03:24 PM
|
0
|
0
|
548
|
|
POST
|
There's no method that checks if lat/lon already exist, but you can use Linq query to do that: The following code checks if any graphic with x/y value exist. Note that the precision need to match in order for this function to return true. var lon = -140.9; var lat = 63.391; var found = l.Graphics.Any(g => g.Geometry is MapPoint && Math.Round((g.Geometry as MapPoint).X, 1) == lon && Math.Round((g.Geometry as MapPoint).Y, 3) ==lat);
... View more
08-07-2012
03:21 PM
|
0
|
0
|
927
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | Friday | |
| 1 | 09-11-2025 01:30 PM | |
| 1 | 06-06-2025 10:14 AM | |
| 1 | 03-17-2025 09:47 AM | |
| 1 | 07-24-2024 07:32 AM |
| Online Status |
Offline
|
| Date Last Visited |
Monday
|