Tag Info

Hot answers tagged

5

The key to proper parenting of WPF windows within a non-WPF application is to use the WindowInteropHelper class. Suppose you have a WpfWindow class which is a WPF window (derives from Window): private void ShowWpfWindowModal() { var parentHandle = new IntPtr(_app.hWnd); // the ArcMap window handle var wpfWindow = new WpfWindow(); ...


5

I've had no issues with WPF in ArcGIS whatsoever. The question of chosing one of these technologies over the other is the same as in any other environment, be it ArcGIS or not. There are things to consider, though. If you want to use WPF as replacement for your forms, then you are definitely OK. If you'd like to use WPF in scenarios like e.g. docking ...


5

All the classes in this namespace (JsonWriter, ArcGISJsonWriter and ArcGISJsonReader) are internal to the ESRI.ArcGIS.Client assembly, so I suspect you won't be able to find any documentation. It is a bummer, though, because these classes do all sort of useful conversion between ESRI's WPF types (geometries, geoprocessing parameters etc.) and JSON. You can ...


4

The only problem your going to come across is if you use the map control and the toolbar controls. You will have to host the controls inside a winhost control. Which makes it impossible to overlay any WPF controls.


4

Have you checked out the Legend in the Toolkit? See sample here: Legend with templates


4

Esri's Runtime for WPF supports WMS layers. It is not free, but the ArcGIS Silverlight SDK is and has many of the same capabilities. So you may want to try the Silverlight SDK in Out-of-browser mode, which is similar to running a WPF app. You need to set up a proxy though.


3

With featureLayers I think you need to reference a single layer in a map service or feature service. So, instead of: http://localhost:6080/arcgis/rest/services/CalvertCity_Test_2/MapServer try http://localhost:6080/arcgis/rest/services/CalvertCity_Test_2/MapServer/0 change the "0" at the end to match the layer you are interested in.


3

You might want to check out BiMserver. It's an open source building information model server. The Building Information Modelserver (short: BIMserver) projects creates software (the BIMserver software) that turns a computer/server into a ‘BIMserver’. A BIMserver enables you to centralize the information of a construction(or other building ...


3

suppose you have just one Layer, with the selected features & you want to zoom to the extent of all the selected features, here is how I would do it: IMapControl2 MapControl= (ImapControl2)_mapControl; IfeatureLayer FeatureLayer=MapControl.Layer[0]; IFeatureSelection FeatureSelection= (IFeatureSelection)FeatureLayer; ISelectionSet ...


3

Using ArcGIS Server and consuming a map service is one way. Or you can turn a Map (MXD) into a Map Package and consume this in the Runtime. You'll probably want to choose your solution based off 2 things: 1) will your app have internet access? 2) if you have internet, will you have an ArcGIS Server to host services. If the answer to either of those questions ...


2

Try using the ControlsSelectFeaturesTool it works on features instead of ControlsSelectTool that work on graphics.


2

You could try this: List<IGeometry> geometries = GetGeometries() // However you retrieve your geometries double margin = 1.2; IEnvelope envelope = null; foreach (IGeometry g in geometries) { if (envelope == null) envelope = g.Envelope; else envelope.Union(g.Envelope); } envelope.Expand(margin , margin , true); ...


2

If you have one Path per Polyline you can do something like this: private void map1_MouseClick(object sender, Map.MouseEventArgs e) { if (map1.Layers["MyGraphicsLayer"] is GraphicsLayer) { GraphicsLayer glayer = (GraphicsLayer)map1.Layers["MyGraphicsLayer"]; IEnumerable<Graphic> graphics = ...


2

The documentation for rubber bands suggests that they should support cancelling via pressing the Esc key. If that really does not work for you, consider using a display feedback instead, e.g. the NewLineFeedback. Display feedbacks are a bit more involved than rubber bands, but they are not necessarily that much difficult to use. Plus, you can Stop most ...


2

After some research I found the following solution: IGraphicsContainer pGraphicsContainer = _pageLayoutControl.GraphicsContainer; pGraphicsContainer.Reset(); IElement pElement = pGraphicsContainer.Next(); while (pElement != null) { if (pElement is IMapFrame) { IMapFrame pMapFrame = pElement as IMapFrame; IEnvelope pEnvelope = new ...


2

There is a binding sample from ESRI. Check it out: http://edndoc.esri.com/arcobjects/9.2/NET/a6eb84fb-93db-4bc3-82a9-874d8890a8ca.htm Same sample in ArcGIS 10 documentation


2

when you create the feature layer be aware that you set the properties DisableClientCaching = true, AutoSave = false, Mode = FeatureLayer.QueryMode.Snapshot then it will be save the edits with: graphicsLayer.SaveEdits();


2

This article looks like it might help: Serializing JSON Geometry Objects between Silverlight, WPF and ArcObjects


2

Alright, so I discovered what this issue was. Feature services and map services have different URLs to access them on the server, and I was using a map service URL from an earlier version of the project to initialize my feature layer. Oops. http://mysite.mydomain.com/ArcGIS/rest/services/mymap/MapServer/0 ...


2

Might be overkill for what you're looking for, but ESRI's CityEngine may be worth a look. http://www.esri.com/software/cityengine/ Esri CityEngine provides professional users in architecture, urban planning, entertainment, GIS, and general 3D content production with a unique conceptual design and modeling solution for the efficient creation of 3D cities ...


2

How to create a map package - ArcGIS Runtime SDK for WPF Help Or did you mean programmatically? As @KHibma points out, map packages can only be created from Desktop, arcpy or ArcObjects, not the WPF Runtime.


2

You can't open an .mxd file directly in the WPF runtime map control. However, you don't necessarily need ArcGIS Server to get it to work. Instead you can publish the map and associated data as a map package. You can create a map package with ArcMap. Then you will need to add a layer in your .xaml file for each layer in the .mxd file. Additionally, you may ...


2

I don't have too much experience in C# and WPF, but I think there should be such controls as webview or whatever where you can display a web page or a map. Define map operations using OpenLayers with javascript and hook them to C# functions.


2

Well it seems that I accidentally answered my own question haha. I put the comma in there to explain that I wanted both of those layers and that is actually how you do it. WOW. That is why coding is fun. LayerIDs="CalvertCity, WaterValves"


2

If you need to add, update, delete features you will first need to publish a "Feature Service", you can do this while publishing your service, by enabling "Feature Access". Then depending on which programming language (Silverlight, Flex, iOS, Javascript, ... etc.) you're using, ESRI has a bunch of API's that allow you to access a Feature Service, to add, ...


2

Based on this error that you reported "Feature Access requires that the data be on SDE; other types of data sources are not supported", I'm assuming that your data is stored in either a file GDB, personal GDB or shapefile. If you are trying to edit data in a feature service, then your editable data has to be in an enterprise SDE database. Here is a link ...


2

The FeatureDataGrid is connected to a single GraphicsLayer or FeatureLayer (which inherits from GraphicsLayer), and uses the attributes to autogenerate column names. Mixing two layers that (probably) have different column names would look confusing on a single table, since some records would fill in some columns, and other records wouldn't. I think that's ...


2

There is a ConstrainExtentBehavior that you can add to the Map. See here. <esri:Map x:Name="MyMap" Extent="-120,30,-60,60"> . . . <i:Interaction.Behaviors> <esriBehaviors:ConstrainExtentBehavior ConstrainedExtent="-120,30,-60,60"/> </i:Interaction.Behaviors> </esri:Map> You can get the extent of your layer ...


2

You can add multiple models to a geoprocessing package by running them and having their results preserved within the Results window. Esri Help page: Adding a result to a geoprocessing package When you will click Add Result, all the results of the models' runs will be listed and you can choose the one you need.


1

I don't know anything more about this than what it says on the page, but ARCHIBUS Geospatial Extensions for ESRI sounds like it might fit the bill. Incorporate a geospatial perspective directly within your ARCHIBUS Web Central dashboards to unlock the power of geospatial visualization for improved analysis, reporting, and decision-making



Only top voted, non community-wiki answers of a minimum length are eligible