|
POST
|
Hi, You need to set MouseButtonEventArgs.Handled to true if you have hooked event to it.
private void map_MouseButtonDown(object sender, MouseButtonEventArgs e)
{
e.Handled = true;
}
... View more
10-11-2012
10:06 PM
|
0
|
0
|
521
|
|
POST
|
I will be attending EDS on London at 12.11.2012 with couple of my colleagues. It would be nice to meet other people, who are active with Runtime. I will be lurking around at London whole weekend, so if there is some interesting to see or someone would like to take a beer with me, let me know. 😄
... View more
10-08-2012
10:13 PM
|
0
|
0
|
596
|
|
POST
|
Hi, You could also try to set DisableClientCaching to True. http://resources.arcgis.com/en/help/runtime-wpf/apiref/index.html?ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer~DisableClientCaching.html
... View more
09-25-2012
09:19 PM
|
0
|
0
|
575
|
|
POST
|
Hi, You cannot serialize Symbols since those contains brushes. If you know exactly what you are going to serialize, you can manually serialize brushes to data object that contains the initialization information. I have made long time ago extension to serialize GraphicsLayer. You can read more about from http://forums.arcgis.com/threads/59595-I-need-to-be-able-to-add-a-symbol-to-the-map-and-save-it?p=220548&viewfull=1#post220548 The code is not near perfect but did the job at that time and it was fun test to work with. If you or other people are interested, I could upload the code to GitHub.
... View more
09-25-2012
09:12 PM
|
0
|
0
|
1146
|
|
POST
|
Hi, Technical vise there is no need for server. Just create map packages via ArcMap and use them in your application. From licensing point of view, follow http://resources.arcgis.com/en/help/runtime-wpf/concepts/index.html#/Licensing_applications/01700000006p000000/.
... View more
09-25-2012
01:06 AM
|
0
|
0
|
781
|
|
POST
|
Hi, To use local layers you need to use ArcGIS Runtime SDK for WPF (1.0 at the moment) over ArcGIS API for WPF. Install instruction can be found from http://resources.arcgis.com/en/help/quick-start-guides/10.1/index.html#/ArcGIS_Runtime_SDK_10_1_Quick_Start_Guide/01q10000000n000000/ Note the step: 3. Click on the product's download link on Esri's Customer Care Portal. Recommended: Use the Esri Download Manager to manage your downloads. So basicly you need to download SDK from Esri's Customer Care Portal. I think that the current location for it is https://customers.esri.com/. If you (or your company) doesn't have subscription in it, contact your local distributor to get access to the SDK. ...i think 😄
... View more
09-24-2012
10:24 PM
|
0
|
0
|
555
|
|
POST
|
Sample with C# from ArcGIS Runtime SDK for WPF / Datasources / Simple
<Grid>
<esri:Map x:Name="_map" Extent="-13486609,5713307,-13263258,5823117">
<esri:ArcGISTiledMapServiceLayer Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer" />
</esri:Map>
</Grid>
public MainWindow()
{
InitializeComponent();
var imageryLayer = new ArcGISImageServiceLayer
{
Url = @"http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Portland/CascadeLandsat/ImageServer",
ID = "ImageryLayer",
ImageFormat = ArcGISImageServiceLayer.ImageServiceImageFormat.PNG8,
NoData = 0
};
_map.Layers.Add(imageryLayer);
}
... View more
09-12-2012
12:11 AM
|
0
|
0
|
727
|
|
POST
|
Remember to mark questions answered if the the answer is good enough.
... View more
09-12-2012
12:02 AM
|
0
|
0
|
926
|
|
POST
|
I was playing around with this and made this kind of solution where I used Dynamic layer to show content, on click do Identify and draw results on the Graphcis layer:
<Window.Resources>
<esri:LocalFeatureService x:Key="FeatureService" Path="Data\\SOPFIM_Full.mpk" MaxRecords="3000" EnableDynamicLayers="True"/>
<esri:SimpleRenderer x:Key="MySimpleRenderer">
<esri:SimpleRenderer.Symbol>
<esri:SimpleFillSymbol BorderBrush="Blue" BorderThickness="4" Fill="Red"/>
</esri:SimpleRenderer.Symbol>
</esri:SimpleRenderer>
</Window.Resources>
<Grid>
<esri:Map x:Name="_map" UseAcceleratedDisplay="True" IsEnabled="false" >
<!-- ArcGIS Online Tiled Basemap Layer -->
<esri:ArcGISTiledMapServiceLayer ID="World Topo Map"
Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/>
<esri:ArcGISLocalDynamicMapServiceLayer Service="{StaticResource FeatureService}">
</esri:ArcGISLocalDynamicMapServiceLayer>
<esri:GraphicsLayer ID="Results" Renderer="{StaticResource MySimpleRenderer}"></esri:GraphicsLayer>
</esri:Map>
</Grid>
public partial class MainWindow : Window
{
private const string PATH = "Data\\SOPFIM_Full.mpk";
private LocalMapService _mapService;
public MainWindow()
{
InitializeComponent();
LocalMapService.GetServiceAsync(PATH, localMapService =>
{
_mapService = localMapService;
_map.IsEnabled = true;
});
this._map.MouseClick += (s, e) =>
{
var graphicsLayer = _map.Layers["Results"] as GraphicsLayer;
graphicsLayer.ClearGraphics();
var task = new IdentifyTask(_mapService.UrlMapService);
var identifyParameters = new IdentifyParameters()
{
Geometry = e.MapPoint,
SpatialReference = _map.SpatialReference,
MapExtent = _map.Extent,
Width = (int)_map.ActualWidth,
Height = (int)_map.ActualHeight,
LayerOption = LayerOption.all
};
task.ExecuteCompleted += (se, ea) =>
{
if (ea.IdentifyResults != null && ea.IdentifyResults.Count > 0)
{
var layer = _map.Layers["Results"] as GraphicsLayer;
ea.IdentifyResults.ForEach(x => layer.Graphics.Add(x.Feature));
}
};
task.Failed += (se, ea) => MessageBox.Show(ea.Error.ToString());
task.ExecuteAsync(identifyParameters);
};
}
I think you can use this kind of solution. When I create graphic from the BIG one, wait an age to get it drawn to the layer and then zoom in and I get again that SEHException. Note esri:LocalFeatureService initialization values.
... View more
09-11-2012
11:55 PM
|
0
|
0
|
1758
|
|
POST
|
I'm still not having any luck following these examples. Here's an example of what I'm looking to do: FeatureLayer layer = new FeatureLayer();
layer.Url = "http://localhost:6080/arcgis/rest/services/QueryMap/FeatureServer/0";
layer.Where = "1=1"; // Hard-coded for now, until we can retrieve results
layer.Mode = FeatureLayer.QueryMode.SelectionOnly;
layer.OutFields = new OutFields() { "*" };
layer.Initialized += FeatureLayer_Initialized;
layer.Initialize(); I have my breakpoint in FeatureLayer_Initialized and everything up until then. I have yet to come across the layer where the graphics count has been > 0 other than when I add the feature directly to my map, which isn't an option in the long run because this is going to be a class library. I have noted there is a 'SelectedGraphics' but that is also 0. My work around so far has been to not use the SDK/API tools given to me but instead directly query my REST service through an HttpRequest and parsing the HttpResponse to figure out if that feature exists, and then again use the REST add/update feature necessary, depending on my query results. Though I've found this somewhat speedier, I'd still like to know a way to do this through the tools given. Thanks for all the help so far. As Mike pointed earlier in this thread, use FeatureLayer.QueryMode.Snapshot as a Mode. You can see how to initialize layer from my previous post.
... View more
09-10-2012
04:57 AM
|
0
|
0
|
1846
|
|
POST
|
This should work in your case:
private FeatureLayer myFeatureLayer;
public MainWindowViewModel()
{
myFeatureLayer = new FeatureLayer
{
Url = "YourAddRess",
ID = "TestEdit",
Mode = FeatureLayer.QueryMode.Snapshot,
};
myFeatureLayer.Initialized += this.myFeatureLayer_Initialized;
myFeatureLayer.InitializationFailed += this.myFeatureLayer_InitializationFailed;
myFeatureLayer.UpdateCompleted += MyFeatureLayerOnUpdateCompleted;
myFeatureLayer.Initialize();
}
private void MyFeatureLayerOnUpdateCompleted(object sender, EventArgs eventArgs)
{
// Magic here.
}
private void myFeatureLayer_InitializationFailed(object sender, System.EventArgs e)
{
}
private void myFeatureLayer_Initialized(object sender, System.EventArgs e)
{
myFeatureLayer.Update();
}
Edit: Another solution is to use ArcGIS Server Rest API directly within your application but if you go that road, you need to write a lot of code more than in this approach.
... View more
09-10-2012
04:17 AM
|
0
|
0
|
1846
|
|
POST
|
Can you post the error information that you get? with regards </Caje>
... View more
09-09-2012
10:56 PM
|
0
|
0
|
442
|
|
POST
|
This is probably obvious to everyone else... If I have ArcGIS Server and serve up geoprocessing and geocoding services, can an application deployed with the ArcGIS Runtime Basic license level run geoprocessing and geocoding tasks on that server? All data and geoprocessing / geocoding smarts would be on the server. I'm hoping yes. Thanks. Yes you can. Someone should correct me if I am wrong but using ArcGIS Server services is default implementation in WPF API and you can you all that functionality with Basic license. Local geoprosessing is another story.
... View more
09-09-2012
10:07 PM
|
0
|
0
|
926
|
|
POST
|
All, I have the need to create a FeatureLayer (local or not) and gain access to its Features --without the use of a Map--. I haven't been successful. The following steps are what I assumed would work: 1. Create a LocalFeatureService. 2. Point it towards a valid MapPackage file. 3. Start the Service. 4. On StartCompleted -> Create a LocalFeatureLayer. 5. Give the LocalFeatureLayer the 'Service' and a valid 'LayerName' (a corresponding, editable layer within the MapPackage). 6. Initialize the Layer. 7. OnInitialized -> Call ::Update() on the layer. 8. Cast to GraphicsLayer. 9. Get the Graphics Collection. I assumed I would see all the Features within the Layer as graphics; I don't (its count = 0). NOTE: If the LocalFeatureLayer is created and given to a map it will have a valid Graphics Collection. Does anyone see another way around this?? -Mike You can use QueryTask to work directly with the map service without the map. I have been using this approach in many cases (well, mainly in Windows Phone projects but nonetheless). I might be a bit old fashioned but I like to work directly with the features when they are the only that I need. Check ArcGIS Runtime SDK for WPF samples / Search / QueryTask category to give a starting point. Query only is good place to start.
... View more
09-09-2012
09:46 PM
|
0
|
0
|
1846
|
|
POST
|
Your welcome. I have been very pleased about the performance with Runtime, but haven't worked yet with the large amount of local data and I can't compare it to Engine since I haven't touched it. It is true, that we need to change a bit our way of thinking/development since we are now working totally new product (with it's strengths and weaknesses). We also need to find new Best Practices and total NoGo's. Anyway, using dynamic and feature layers together does not solve the real problem, that is the SEHException occuring when fetching the data. I hope that someone from the Runtime team can check this problem and verify if it really is a bug or are we just missing something here.
... View more
09-06-2012
09:42 PM
|
0
|
0
|
1758
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-12-2014 03:52 AM | |
| 1 | 08-27-2015 03:47 AM | |
| 1 | 12-08-2014 09:58 AM | |
| 1 | 05-05-2015 10:19 AM | |
| 1 | 07-30-2015 08:43 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|