I would like to open MXD using ArcGIS Runtime WPF.
There is no example about this.
Anybody has a solution?
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.
Sign up to join this communityI would like to open MXD using ArcGIS Runtime WPF.
There is no example about this.
Anybody has a solution?
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:
If the answer to either of those questions is NO, you'll probably need to go the Local MPK way.
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>