|
POST
|
Hi, The overload which accepts a Uri is expecting the Uri of a file which contains a JSON representation of the actual features themselves. To achieve what I believe you're trying to do - you can just loop through the Graphics in the FeatureLayer and add those to a new GPFeatureRecordSetLayer e.g. List<GPParameter> parameters = new List<GPParameter>();
GPFeatureRecordSetLayer gpFeatureRecordSetLayer = new GPFeatureRecordSetLayer("InputFeatures");
foreach (var g in _featureLayer.Graphics)
{
gpFeatureRecordSetLayer.FeatureSet.Features.Add(g);
}
parameters.Add(gpFeatureRecordSetLayer);
Or alternatively (and recommended) would be to execute a query against the FeatureLayer with the QueryTask in order to retrieve the required subset of features. The QueryTask returns a FeatureSet which contains Graphic features - so again you can easily add this to the GPFeatureRecordSetLayer parameter. We've been working on additional samples since Beta 1 but you will find some Geoprocessing samples already in the locally installed sample application (e.g. C:\Program Files (x86)\ArcGIS SDKs\WPF10.1\SDK\Samples). At Beta 1 we shipped the whole project source code for the samples app - we've now changed this to launch as a compiled app straight from the start menu so it will be much easier to access in the forthcoming Beta 2. Cheers Mike
... View more
11-10-2011
11:56 PM
|
0
|
0
|
625
|
|
POST
|
Hi, Many significant changes have been made since Beta 1 in relation to the creation of Tile Packages in ArcGIS Desktop and how we read Tile Packages in the ArcGIS Runtime SDK for WPF. I can confirm that this the TPK you refer to on ArcGIS.com can be read fine with the current API so it would appear that whatever the issue was, it has been resolved. We really appreciate your feedback. Cheers Mike
... View more
11-08-2011
12:13 AM
|
0
|
0
|
656
|
|
POST
|
Hi, In Beta 1 there was no out-of-the-box way to create a Tile Package from an existing cached map service. However we hope to add an option to ArcGIS Server cached map services to allow users to request an extent to be delivered as a Tile Package (.TPK) file. I don't think that functionality will be available in beta 2 though. In the mean time, your options are to either open the map on which your tiled map service was based and use the tile packaging functionality to create a new Tile Package. Or alternatively, if you already have a cache which you would like to use wholesale with the ArcGIS Runtime then you may be able to manually create a TPK. The Tile Package is effectively a compact cache zipped up (no additional compression) into a single file - it's designed to be as portable as possible for ease of deployment. Therefore you could try zipping up an existing compact cache folder - if you're using the 7-zip application, the archive format needs to be "zip" and compression level should be "Store" for no compression. The zip file extension should then be renamed to ".tpk". This would obviously be an unsupported workflow - but will hopefully save you some time in the interim. Cheers Mike
... View more
11-08-2011
12:07 AM
|
0
|
0
|
2373
|
|
POST
|
Hi, Feature layer serialization does not support WCF serialization (DataContract attributes) �?? the properties of Feature layer are not attributed to do this. To solve this you may need to write your own serialization by reading and writing values during serlialization and controlling what it is that you want to save. For a feature layer it may make the most sense to save the url to the feature service and any other setting (like ondemand mode etc). If you want to work with WCF serialization then you could create a wrapper class with attribution in place that can copy these properties and then be saved. Similarly in reverse when its instantiated you can manufacture a Feature Layer by setting back the properties. Cheers Mike
... View more
11-07-2011
02:16 AM
|
0
|
0
|
866
|
|
POST
|
Hi, To set labels for graphic features you can create your own custom MarkerSymbols (or LineSymbols/FillSymbols) by using a ControlTemplate. The following example defines a symbol in XAML in the Grid.Resources section then in code it creates 10 random points and assigns the custom symbol to them, labelling them with an attribute called "NAME". XAML: <Window x:Class="GraphicLabel.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:esri="http://schemas.esri.com/arcgis/client/2009"
Title="MainWindow" Height="350" Width="525">
<Grid x:Name="LayoutRoot">
<Grid.Resources>
<esri:MarkerSymbol x:Key="labelSymbol" OffsetX="6" OffsetY="6">
<esri:MarkerSymbol.ControlTemplate>
<ControlTemplate>
<Grid>
<!--Marker-->
<Ellipse Width="12" Height="12" Fill="Red" HorizontalAlignment="Left" VerticalAlignment="Top" />
<!--Label-->
<Grid Margin="8,8,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" IsHitTestVisible="False">
<!--Text halo using a white blurred text-->
<TextBlock Foreground="White" Text="{Binding Attributes[NAME]}" >
<TextBlock.Effect>
<BlurEffect Radius="5" />
</TextBlock.Effect>
</TextBlock>
<!--Text-->
<TextBlock Foreground="Black" Text="{Binding Attributes[NAME]}" />
</Grid>
</Grid>
</ControlTemplate>
</esri:MarkerSymbol.ControlTemplate>
</esri:MarkerSymbol>
</Grid.Resources>
<esri:Map x:Name="_mapControl" Background="Gray" WrapAround="True">
<esri:ArcGISTiledMapServiceLayer ID="arcGISTiledMapServiceLayer"
Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer" />
<esri:GraphicsLayer ID="graphicsLayer"/>
</esri:Map>
</Grid>
</Window> CODE: using System.Windows;
using ESRI.ArcGIS.Client;
using ESRI.ArcGIS.Client.Symbols;
using ESRI.ArcGIS.Client.Geometry;
using System;
namespace GraphicLabel
{
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
Random random = new Random();
GraphicsLayer graphicsLayer = _mapControl.Layers["graphicsLayer"] as GraphicsLayer;
for(int i = 0; i <=10 ; i++)
{
Graphic graphic = new Graphic()
{
Geometry = new MapPoint(random.Next(0,10000000),random.Next(0,10000000)),
Symbol = LayoutRoot.Resources["labelSymbol"] as MarkerSymbol,
};
graphic.Attributes.Add("NAME",string.Format("Point {0}", i.ToString()));
graphicsLayer.Graphics.Add(graphic);
}
}
}
} Cheers Mike
... View more
11-07-2011
12:57 AM
|
0
|
0
|
647
|
|
POST
|
Hi, Correct, no special software/licenses are required. The ArcGIS Runtime SDKs are built to take advantage of the features of their target platforms: Android; iOS; Java; Qt; Win Mobile; Win Phone; and WPF). For WPF developers on Windows it's the .NET Framework which is now considered a standard part of the Windows operating system. The ArcGIS Runtime SDK for WPF requires .NET 4.0 (Client Profile or greater) which you will however need to check for when deploying your ArcGIS Runtime WPF applications. Windows 7 shipped with .NET 3.5 so you will need to ensure .NET 4.0 is installed. You can find more information here on deploying .NET 4.0 with your application: http://msdn.microsoft.com/en-us/library/ee942965.aspx. Cheers Mike
... View more
10-28-2011
12:38 AM
|
0
|
0
|
711
|
|
POST
|
Hi, Thanks for the post. Basemap layers within ArcGIS for Desktop (ArcView, etc) are not typically supported for packaging or publishing as services because they are designed to behave in a particular manner within ArcMap in order to provide great performance with large background layers. However, the analyzers (which alert you via the Prepare Window) should pick this up when packaging so this is something we need to take a look at. Thanks again for the feedback Cheers Mike
... View more
10-19-2011
11:56 PM
|
0
|
0
|
693
|
|
POST
|
Hi, The "Map data not yet available" message comes from the tiled map service itself, which means there is not anything directly you can do to control this (other than use your own local tiled package based on your own data). However, we are considering providing an option to override this which would mean for example, dropping back to the previous available level of cache and accepting some blurriness. Thanks for your feedback. Cheers Mike
... View more
10-12-2011
12:58 AM
|
0
|
0
|
1002
|
|
POST
|
Hi, Map Packages can reference data externally to the package, but this must be via an absolute path because the Map Package is by nature meant to be portable and the unpack location cannot be predicted (i.e. although currently packages are always unpacked to the user profile, in the future, users of ArcGIS for Desktop will be able to choose their default unpack location and developers working with the ArcGIS Runtime will be able to set the unpack location via the API). There are two strategies for absolute paths: 1. UNC paths: For working with UNC paths, folder shares can be created with the NET SHARE command (http://technet.microsoft.com/en-us/library/bb490712.aspx) or alternatively if the current user is in the administrators group on the local machine then you can use the default administrative share (e.g. \\localhost\c$). There may be other options within Java for this too. 2. Virtual drives: Mapping a virtual drive to a physical folder on disk can be done via the SUBST command (e.g. http://technet.microsoft.com/en-us/library/bb491006.aspx). There may be other options within Java for this too. The rasters should be added to the Unmanaged Raster Catalog via UNC path and the raster catalog should also be added to ArcMap via a UNC path. Then once packaged, the map package will only reference the external geodatabase containing the raster catalog. Cheers Mike
... View more
10-12-2011
12:52 AM
|
0
|
0
|
1264
|
|
POST
|
Hi, Currently neither the WPF or Java Runtime SDKs support raster data as a user (developer) input to a geoprocessing tool. Raster is supported as intermediate data, which is almost certainly what it should be in the case of the viewshed tool you're trying to create/run. Your inputs to a viewshed model are typically an observer location (a GPFeatureRecordSetLayer containing a point geometry) and a radius (probably a GPLinearUnit). You need to make sure that you have built your geoprocessing model exactly as you would do for publishing to ArcGIS Server... here are some tips: #1. Use the %ScratchWorkspace% environment variable for any intermediate/output data (this means ArcGIS Desktop, ArcGIS Runtime and any other ArcGIS applications know where to write the intermediate/output data, instead of just C:\data for example). #2. Ensure you have set the input(s) AND output as Model Parameters (right click and choose "Model Parameter"). NOTE: Be careful about the order in which you do this as it determines the order in which the parameters are expected when the tool is run. You can open the model properties dialog to confirm (and adjust) the order of the parameters. The output/derived parameter should really always be last. #3. Run the Geoprocessing tool once within ArcMap to get a successful execution and results. #4. Share the Geoprocessing result from the Results Window as a Geoprocessing Package. NOTE: Ensure you check the option to support the ArcGIS Runtime. #5. When programmatically running the GP tool, the order in which you provide the input parameters MUST be exactly the same as the order in which they were defined in the model. The parameter names must also match. you do not need to specify the output parameter. #6. Insert a breakpoint after the local geoprocessing service is started. Once the breakpoint is hit - check the Error property to confirm there was no problem encountered starting the service. Then get the UrlGeoprocessingService property and paste it into a browser (while the app is still in debug mode and the local server is still running). This will display the HTML view of the server which will tell you what tool(s) are in your GP package and what parameters each tool expects. Here's the JSON from the Viewshed service mentioned in the Java post which is running on SampleServer1: { "name" : "Viewshed", "displayName" : "Viewshed", "category" : "", "helpUrl" : "http://sampleserver1b.arcgisonline.com/arcgisoutput/Elevation_ESRI_Elevation_World/Viewshed.htm", "executionType" : "esriExecutionTypeSynchronous", "parameters" : [ { "name" : "Input_Observation_Point", "dataType" : "GPFeatureRecordSetLayer", "displayName" : "Input Observation Point", "direction" : "esriGPParameterDirectionInput", "defaultValue" : { "DEPRECATED" : { "Fields" : "The 'Fields' property has been deprecated. Please use the 'fields' property instead." }, "geometryType" : "esriGeometryPoint", "spatialReference" : { "wkid" : 54003 }, "Fields" : [ { "name" : "FID", "type" : "esriFieldTypeOID", "alias" : "FID"}, { "name" : "Shape", "type" : "esriFieldTypeGeometry", "alias" : "Shape"}, { "name" : "OffsetA", "type" : "esriFieldTypeDouble", "alias" : "OffsetA"} ], "fields" : [ { "name" : "FID", "type" : "esriFieldTypeOID", "alias" : "FID"}, { "name" : "Shape", "type" : "esriFieldTypeGeometry", "alias" : "Shape"}, { "name" : "OffsetA", "type" : "esriFieldTypeDouble", "alias" : "OffsetA"} ] }, "parameterType" : "esriGPParameterTypeRequired", "category" : "", "choiceList" : [] }, { "name" : "Viewshed_Distance", "dataType" : "GPLinearUnit", "displayName" : "Viewshed Distance", "direction" : "esriGPParameterDirectionInput", "defaultValue" : { "distance" : 15000, "units" : "esriMeters" }, "parameterType" : "esriGPParameterTypeRequired", "category" : "", "choiceList" : [] }, { "name" : "Viewshed_Result", "dataType" : "GPFeatureRecordSetLayer", "displayName" : "Viewshed Result", "direction" : "esriGPParameterDirectionOutput", "defaultValue" : { }, "parameterType" : "esriGPParameterTypeRequired", "category" : "", "choiceList" : [] } ] } Hopefully this should help you progress with running the viewshed. Cheers Mike
... View more
10-11-2011
06:46 AM
|
0
|
0
|
1357
|
|
POST
|
Hi, Unfortunately from that error message alone, it's difficult to tell what the problem might be. Perhaps you can share your Viewshed tool and the code you have written to execute the tool? Cheers Mike
... View more
10-11-2011
12:18 AM
|
0
|
0
|
1357
|
|
POST
|
Hi, What type of raster catalog are you using: 1) Old DBF catalog, 2) Managed GDB raster catalog or 3) Unmanaged GDB raster catalog? Raster catalogs are supported by the ArcGIS Runtime and will be packaged, however unless the raster catalog is in an Enterprise Geodatabase the rasters will be incorporated in the Map Package. I believe this requires some more investigation. However, the good news is that we hope to support Mosaic Datasets (in a standard local dynamic map service) sooner than previously expected. Local Image services are a longer term goal (post 1st release). Cheers Mike
... View more
10-07-2011
05:44 AM
|
0
|
0
|
1264
|
|
POST
|
Hi, We have briefly tested an ArcGIS Runtime application on the recently released Windows 8 early beta and will be performing additional testing over the coming months. However, Windows 8 is not scheduled to be released until after ArcGIS 10.1 (including the ArcGIS Runtime) and therefore it's not possible to say at this this time what the status will regarding certification. The good news is that we're planning to enter an "off-cycle" release schedule with the ArcGIS Runtime after 10.1 which means we'll hopefully be able support Windows 8 soon after its release. Cheers Mike
... View more
10-06-2011
12:28 AM
|
0
|
0
|
1357
|
|
POST
|
Hi, Following your feedback, we've simplified the naming of the local extension classes to make their usage more obvious - for example the LocalGeometryTask class becomes GeometryServiceLocalExtensions to indicate that it's only intended to provide local extension methods for the existing GeometryService class. The simplest code is (which you can still use at Beta 1 I think): GeometryService geometryTask = new GeometryService(); geometryTask.InitializeWithLocalService(); ... geometryTask.Project(....); Many thanks for your feedback - and we'll certainly be including samples / doc to cover this. Cheers Mike
... View more
10-04-2011
12:24 AM
|
0
|
3
|
2045
|
|
POST
|
Hi, We're currently working on a print capability and hope to have this ready by the next beta later in the year. Cheers Mike
... View more
10-03-2011
12:32 AM
|
0
|
0
|
1767
|
| 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 |
3 weeks ago
|