|
POST
|
Hi, You can use your development license for testing purposes. You should use the LicenseViewer application installed with the SDK to view your development license(s). This application will help you get the license string to set in the application. Add the call the ArcGISRuntime.SetLicense before using any ArcGIS Runtime functionality. When you need to purchase licenses you should contact your local esri distributor. Cheers Mike
... View more
05-07-2013
03:17 AM
|
0
|
0
|
649
|
|
POST
|
Hi, I've modified the Buffer sample in the SDK to demonstrate how to submit multiple features:
private void MyMap_MouseClick(object sender, ESRI.ArcGIS.Client.Map.MouseEventArgs e)
{
_gpTask.CancelAsync();
GraphicsLayer graphicsLayer = MyMap.Layers["MyGraphicsLayer"] as GraphicsLayer;
graphicsLayer.ClearGraphics();
e.MapPoint.SpatialReference = MyMap.SpatialReference;
Graphic graphic = new ESRI.ArcGIS.Client.Graphic()
{
Geometry = e.MapPoint,
Symbol = LayoutRoot.Resources["DefaultClickSymbol"] as ESRI.ArcGIS.Client.Symbols.Symbol
};
graphic.SetZIndex(1);
graphicsLayer.Graphics.Add(graphic);
// Build paramaters
List<GPParameter> gpParams = new List<GPParameter>();
double dist = System.Convert.ToDouble(500);
// Old code from Buffer sample (single graphic approach)
//var g = new Graphic { Geometry = e.MapPoint };
//var fs = new FeatureSet(new List<Graphic> { g });
List<Graphic> graphicsList = new List<Graphic>();
Random random = new Random();
for (int i = 0; i < 5; i++)
{
var g = new Graphic { Geometry = new MapPoint(random.Next(-20000000, 20000000), random.Next(-20000000, 20000000), MyMap.SpatialReference), };
graphicsList.Add(g);
}
var fs = new FeatureSet(graphicsList);
gpParams.Add(new GPFeatureRecordSetLayer("InputFeatures", fs));
gpParams.Add(new GPLinearUnit("Distance", esriUnits.esriKilometers, dist));
_gpTask.ExecuteCompleted += (s, e1) =>
{
GPExecuteResults results = e1.Results;
GPFeatureRecordSetLayer rs = results.OutParameters[0] as GPFeatureRecordSetLayer;
List<Graphic> resultGraphics = new List<Graphic>();
for (int i = 0; i < rs.FeatureSet.Features.Count; i++)
{
Graphic graphicBuff = new ESRI.ArcGIS.Client.Graphic()
{
Geometry = rs.FeatureSet.Features.Geometry,
Symbol = LayoutRoot.Resources["DefaultFillSymbol"] as ESRI.ArcGIS.Client.Symbols.Symbol
};
resultGraphics.Add(graphicBuff);
}
graphicsLayer.Graphics.AddRange(resultGraphics);
};
_gpTask.Failed += (s2, e2) =>
{
MessageBox.Show(e2.Error.Message);
};
_gpTask.ExecuteAsync(gpParams);
}
Cheers Mike
... View more
05-07-2013
02:39 AM
|
0
|
0
|
1172
|
|
POST
|
Hi, For offline/local basemaps you should be using a Tile Package (.TPK), created with ArcMap or extracted from ArcGIS Server. You can also use "exploded" tile caches (i.e. a direct copy of an ArcGIS Server cache) as long as they use the compact cache format. Performance of these tile caches is usually very fast and you won't noticeably see any white space where you would expect to see tiles. You're correct that the accelerated display mode can't dramatically improve performance of tile packages, although it may be a little faster. As you've noted, the area where the accelerated display does dramatically improve performance is with graphics (GraphicsLayers) and any layers which derive from graphics (e.g. FeatureLayers). I would advise starting with the accelerated display enabled via the property on the Map and if you find layers or symbol types which you need to use that are not supported then consider whether there are alternative layers, or more likely, alternative symbols/renderers you can use which are supported. Typically this just means avoid creating custom symbols via ControlTemplates and stick to the esri symbol types (SimpleMarkerSymbol, PictureMarkerSymbol, etc). Cheers Mike
... View more
05-07-2013
01:19 AM
|
0
|
0
|
1316
|
|
POST
|
Hi, Can you zip up and post your example on this thread? (or email me on [email protected]) Cheers Mike
... View more
05-02-2013
02:14 AM
|
0
|
0
|
1090
|
|
POST
|
Hi, When the graphics aren't bound to a FeatureDataGrid selection is very fast (I tested up to 3500) - so it's the binding between the GraphicsLayer and the FeatureDataGrid that introduces the delay (I saw approx. 9 seconds delay in when selecting all graphics either in the map or in the data grid). You can download the source code for the WPF FeatureDataGrid here - http://esrisilverlight.codeplex.com. Perhaps there's a way to optimize the selection. Cheers Mike
... View more
05-01-2013
06:20 AM
|
0
|
0
|
1830
|
|
POST
|
Hi, Unfortunately it's not possible to have one symbol for point, polyline and polygon geometries since they are all different geometry types and have associated symbols relevant to their particular display needs. Point: SimpleMarkerSymbol, PictureMarkerSymbol, TestSymbol Polyline: SimpleLineSymbol Polygon: SimpleFillSymbol, PictureFillSymbol I'd recommend avoiding the use of custom ControlTemplates as in your example below - they're not supported in the accelerated display mode. Cheers Mike
... View more
05-01-2013
01:27 AM
|
0
|
0
|
828
|
|
POST
|
Hi, It may be worth wrapping your image/Bitmap creation with a .BeginInit() call and an .EndInit() call. However, there is also a known issue in 10.1.1 where PictureMarkerSymbols do not update if you change the Source property using a BitmapImage created from a StreamSource. The workaround is to set the Uri, or alternatively you can use RenderTargetBitmap to force an off-screen render of a Visual element and then use the RenderTargetBitmap as the Source property of the PictureMarkerSymbol. There's an example of the latter approach in the DevSummit 2013 demos on GitHub: https://github.com/Esri/tips-and-tricks-wpf/tree/master/Best-Development-Practices-and-Patterns/PictureMarkerSymbol-From-Wpf. That Tips and Tricks repo contains all our demos from this year's Dev Summit. You can also find them on ArcGIS.com: http://www.arcgis.com/home/item.html?id=3f69c79bbd7340b09fad396647a977a5. Please can you post a simple reproducer for the memory leak issue you're seeing? (or email me on [email protected]). Cheers Mike
... View more
05-01-2013
12:46 AM
|
0
|
0
|
838
|
|
POST
|
Hi, It's a feature of the "accelerated" rendering engine at the core of the ArcGIS Runtime, that you can supply marker, line or fill symbols and they'll be applied to the appropriate sub geometry of your shape i.e. SimpleMarkerSymbols will be applied to the vertices of Polylines and Polygons and SimpleLineSymbols will be applied to the line segments of Polylines and Polygons. The original WPF based display does not follow the same pattern. Ideally, you should consider the "accelerated" display as the only display. However, currently there are some items which are not supported in the runtime core display, such as KML, clusterer renderers, temporal renderers. Cheers Mike
... View more
04-24-2013
10:04 AM
|
0
|
0
|
4820
|
|
POST
|
Hi, To add raster datasets directly to the map, as David suggested, you will need to go via an ArcGISLocalDynamicMapServiceLayer. The class name indicates what's going on here... it's local and the rendering is done dynamically by a map service - i.e. the raster is rendered to an image by the RuntimeLocalServer on your machine and the image is combined with other tiles/images/graphics as layers in the Map. These local dynamic map service layers need a seed Map Package (.MPK) created with ArcMap. If it's a predetermined raster that you will always add to your application then the best approach is to add the raster to an ArcMap document, and create a Map Package from that document which will include the raster in a nice, portable package. However, if you need a more adhoc approach then you'll need to effectively create a seed Map Package into which you can stuff raster datasets at runtime. When creating the Map Document for the MPK, you need to add at least one layer to make it valid - this could be a simple feature class such as a polygon layer representing the geographic extent of the coordinate system of the Map (e.g. from -180,-90 to 180,90 if you're working in WGS84). Or the layer could just be an empty Group Layer. And you should also set the coordinate system of the Map Document. Then "share" it as a Map Package, making sure you check the box to enable support for the ArcGIS Runtime. In code you then create a LocalMapService, add a dynamic workspace (the folder in which the raster resides), and create the ArcGISLocalDynamicMapServiceLayer, setting the EnableDynamicLayers property to true. You can add any shapefiles, rasters of geodatabase layers to that ArcGISLocalDynamicMapServiceLayer via the DynamicLayerInfos property... here's an example: http://resources.arcgis.com/en/help/runtime-wpf/samples/index.html#/Add_Shapefiles_and_Rasters/02q20000004z000000/ Cheers Mike
... View more
04-24-2013
08:06 AM
|
0
|
0
|
3177
|
|
POST
|
Hi, That's correct. You might also want to listen for the InitializationFailed event. You might also consider working with the underlying LocalMapService directly - where you can set the MaxRecords property (with respect to queries). Example below - I've used both an inline handler and explicit named events - obviously which pattern you choose is up to you.
public MainWindow()
{
InitializeComponent();
LocalMapService localMapService = new LocalMapService(@"..\Maps_and_Data\Map.mpk")
{
MaxRecords=1000000
};
localMapService.StartAsync(localServiceCallback =>
{
if (localServiceCallback.Error != null)
{
// Do something with Error
return;
}
ArcGISDynamicMapServiceLayer localDynamicLayer =
new ArcGISLocalDynamicMapServiceLayer(localMapService);
localDynamicLayer.Initialized += localDynamicLayer_Initialized;
localDynamicLayer.InitializationFailed += localDynamicLayer_InitializationFailed;
MyMap.Layers.Add(localDynamicLayer);
});
}
void localDynamicLayer_InitializationFailed(object sender, System.EventArgs e)
{
}
void localDynamicLayer_Initialized(object sender, System.EventArgs e)
{
}
Cheers Mike
... View more
04-24-2013
07:39 AM
|
1
|
0
|
973
|
|
POST
|
Hi, Here's an example of how you could achieve this with a GraphicsLayer / FeatureLayer. It involves creating a unique value renderer with values from 0-360 and creating the same number of picture marker symbols, each rotated by one degree. Then assign the UVR to a graphics layer (in this cases I�??ve just added 100 graphics, each with an "Angle" property of between 0 and 360). If you weren't so concerned about each individual angle, you could use a ClassBreaksRenderer for ranges of angle values.
GraphicsLayer _graphicsLayer;
// Create an ImageBrush
ImageBrush simpleArrow = new ImageBrush();
simpleArrow.ImageSource = new BitmapImage(new Uri("pack://application:,,,/Images/SimpleArrow.png", UriKind.Absolute));
// Found an image on http://www.iconfinder.com/search/?q=simple+arrow
// Add an Ellipse Element & use the ImageBrush as the Fill for the Ellipse
Ellipse myEllipse = new Ellipse();
myEllipse.Fill = simpleArrow;
myEllipse.HorizontalAlignment = HorizontalAlignment.Center;
myEllipse.VerticalAlignment = VerticalAlignment.Center;
myEllipse.Width = 24;
myEllipse.Height = 24;
// Create a UniqueValueRenderer based on the Angle attribute/field in the underlying data
var renderer = new UniqueValueRenderer()
{
Field = "Angle",
};
// Create UniqueValueInfo objects for each integer value 0-360 and an associated PictureMarkerSymbol for each one, rotated to that value.
for (int i = 0; i < 361; i++)
{
// Rotate by the angle 0-360 and about the center of the 24x24 pixel image.
myEllipse.RenderTransform = new RotateTransform(i,12,12);
//Force a render
myEllipse.Measure(new Size(Double.PositiveInfinity, Double.PositiveInfinity));
myEllipse.Arrange(new Rect(myEllipse.DesiredSize));
RenderTargetBitmap render = new RenderTargetBitmap(34, 34, 96, 96, PixelFormats.Default);
render.Render(myEllipse);
// Create a PictureMarkerSymbol
PictureMarkerSymbol pms = new PictureMarkerSymbol()
{
Source = render,
};
// Create the UniqueValueInfo
UniqueValueInfo uniqueValueInfo = new UniqueValueInfo()
{
Value = i,
Symbol = pms,
};
// Add the UniqueValueInfo to the Infos property on the renderer
renderer.Infos.Add(uniqueValueInfo);
}
// Create a new GraphicsLayer
_graphicsLayer = new GraphicsLayer();
// Create a instance of the Random class to generate random coordinate pairs.
Random random = new Random();
// Add graphics to a List<Graphic>
var graphicsList = new List<Graphic>();
for (int i = 0; i < 100; i++)
{
var x = (random.NextDouble() * 40000000) - 20000000;
var y = (random.NextDouble() * 40000000) - 20000000;
var graphic = new Graphic()
{
// assign each graphic a number 0, 1, 2 - we''ll use this to represent he color
Geometry = new MapPoint(x, y),
Attributes = { { "Angle", random.Next(0,361)} }
};
graphicsList.Add(graphic);
}
// Set the renderer
_graphicsLayer.Renderer = renderer;
// Bulk add of graphics - more efficient than adding one graphic at a time
_graphicsLayer.Graphics.AddRange(graphicsList);
// Add layer to Map
MyMap.Layers.Add(_graphicsLayer);
Hope that helps Cheers Mike
... View more
04-12-2013
06:05 AM
|
1
|
2
|
2240
|
|
POST
|
Hi, Rotating symbols based on an attribute is on the roadmap for a future release but in the mean time the best alternative is to create a renderer which will . This will depend on how many discrete values you have - you could use a UniqueValueRenderer for specific values (e.g. 0, 90, 180, 270) or a ClassBreaksRenderer for ranges of values (0-90, 91-180, 181-270, 271-360). For an example, take a look at http://resources.arcgis.com/en/help/runtime-wpf/samples/index.html#/Rendering_with_XAML/02q200000036000000/. I would recommend avoiding ControlTemplating symbols because this is not supported in the hardware accelerated display (i.e. when you set Map.UseAcceleratedDisplay to True). You can programmatically create symbols too - that's just given me a great idea for a new sample. Cheers Mike
... View more
04-12-2013
03:06 AM
|
0
|
0
|
2240
|
|
POST
|
Hi, Apologies for the delay in responding. You have spotted a gap in the API which we hope to resolve in a future release - but for now you have two options: #1. Use the Geoprocessor task in conjunction with a GPK based on a Python script which provides this functionality. This would be my preferred approach - using Arcpy and Python gives you massive flexibility. I've written up a sample of this and attached to the post. #2. Use the File Geodatabase API. This probably provides the functionality you require via a .NET API - but would be a hybrid solution of the ArcGIS Runtime SDK for WPF and the File GDB API. Cheers Mike
... View more
04-11-2013
06:12 AM
|
0
|
0
|
870
|
|
POST
|
Hi, Public services are now only available in the Web Mercator coordinate system. You can check the support status here: http://downloads2.esri.com/support/product%20life%20cycle/online_gis/ArcGISOnlineServ_PLC.pdf. ArcGIS can host your own tiled map services for you. In order to do this you'll need an Organizational account - see http://resources.arcgis.com/en/help/arcgisonline/index.html#/Hosted_tiled_map_services/010q0000006n000000/ for more info. Cheers Mike
... View more
04-10-2013
05:08 AM
|
0
|
0
|
1335
|
|
POST
|
Hi, Please can you provide a little more detail on what you're trying to achieve? Cheers Mike
... View more
04-10-2013
03:09 AM
|
0
|
0
|
711
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-14-2026 05:04 AM | |
| 1 | 02-20-2024 07:02 AM | |
| 1 | 01-19-2026 06:44 AM | |
| 1 | 12-10-2025 07:16 AM | |
| 1 | 11-21-2025 08:12 AM |
| Online Status |
Offline
|
| Date Last Visited |
07-02-2026
06:07 AM
|