I would like to open MXD using ArcGIS Runtime WPF.
There is no example about this.
Anybody has a solution?
-
not sure but may be helpful forums.arcgis.com/threads/…Sunil– Sunil2013年02月06日 13:19:06 +00:00Commented Feb 6, 2013 at 13:19
-
1Thank you..... You will need to publish the MXD to ArcGIS Server, and then use the REST service this creates to display the map. You cannot load an MXD directly.user3120– user31202013年02月06日 13:29:41 +00:00Commented Feb 6, 2013 at 13:29
2 Answers 2
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:
- will your app have internet access?
- if you have internet, will you have an ArcGIS Server to host services.
If the answer to either of those questions is NO, you'll probably need to go the Local MPK way.
-
The app will have no internet access. So, is it possible to create a MPK with ArcGis Server ? and to save a Map in WPF Runtime ?user3120– user31202013年02月07日 13:12:38 +00:00Commented Feb 7, 2013 at 13:12
-
1ArcGIS Server has geoprocessing, so you can either create a geoprocessing service, or simply use Server's Python to call tools. So yeah, ArcGIS Server "can create an mpk".. (via the Map Package tool)KHibma– KHibma2013年02月11日 17:20:40 +00:00Commented Feb 11, 2013 at 17:20
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 have to make some tweaks in xaml (or code behind) to get the rendering to look the same.
You might have something like this:
<esri:Map WrapAround="True" x:Name="theMap" >
<esri:ArcGISTiledMapServiceLayer Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>
<esri:ArcGISLocalFeatureLayer x:Name="MyFeaureLayer" ID="Things" Path="C:/maps/ThingsMap.mpk" LayerName="Things" OutFields="*" Editable="True" AutoSave="False" ValidateEdits="True" Mode="OnDemand" SelectionColor="#FFFFFF00" />
</esri:Map>