2

I would like to open MXD using ArcGIS Runtime WPF.

There is no example about this.

Anybody has a solution?

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Feb 6, 2013 at 13:05
2
  • not sure but may be helpful forums.arcgis.com/threads/… Commented Feb 6, 2013 at 13:19
  • 1
    Thank 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. Commented Feb 6, 2013 at 13:29

2 Answers 2

5

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 is NO, you'll probably need to go the Local MPK way.

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
answered Feb 6, 2013 at 16:17
2
  • 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 ? Commented Feb 7, 2013 at 13:12
  • 1
    ArcGIS 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) Commented Feb 11, 2013 at 17:20
3

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>
answered Jan 22, 2014 at 23:33

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.