MapDotNet UX Help

The following is a brief description of what is provided in the sample applications installed with MapDotNet UX. There are samples in the Samples folder provided within your installation for Silverlight, WPF, Engine (WPF with an embedded UX services instance), and HTML/JavaScript using Microsoft Bing Maps for Enterprise. Basic functionality provided by the samples are:

  • Initialization of a RIM (Rich Interactive Mapping) control based on a supplied URI to MapDotNet UX Web Services and a "map ID" which uniquely identifies a map defined on the server.  Note that the Engine sample binds to an embedded services instance rather than to a web service URI.
  • Binding of any error command executed within the RIM control to the UI.
  • Binding of the mouse move command executed on the map to a method which displays the mouse position.
  • Binding of the map position change command (executed when the maps zoom level or map center changes) to a method which displays the current zoom level and map scale.
  • The addition of a Microsoft Bing Maps base tile layer.  Note that the Engine sample instead adds a base layer using locally stored ortho tiles.
  • The addition of a MapDotNet UX map service tile layer (for the Sample map provided with your product installation.)
  • UI and code-behind to change base layers.
  • UI and code-behind for drill-down identify.


How to start a mashup with your own map data by copying the Silverlight Sample provided with a MapDotNet UX installation. 

In Studio UX, select http://localhost/MapDotNetServerUX8.0 as the current server and then design your map.  Use the "Add" button if you wish to design a map on a different server instance.


In VisualStudio 2010:

  1. Make sure the file ‘clientaccesspolicy.xml’ from ‘C:\Program Files\MapDotNet\7.0\Apps\Silverlight\Sample\SampleWeb’ has been copied from to your local web server root (C:\Inetpub\wwwroot)

  2. Copy C:\Program Files\MapDotNet\7.0\Apps\Silverlight\Sample into your projects folder and rename the directory, for example ‘MyApp’.

  3. Open the copied solution in Visual Studio 2008:  If  you see the following dialog (this happens if you are using a Local IIS Web server instead of Visual Studio Development Server to run the app from Visual Studio):

Select no. 

  1. Right click SampleWeb(unavailable) in Solution Explorer and select “Edit SameplWeb.csproj”.  Locate <ProjectExtensions> at the end of the file, and edit <IISUrl> to use a new directory based on your project name, for example:


  1. Right click SampleWeb(unavailable) in Solution Explorer and select “Reload Project”.  This time select ‘Yes’ when it ask if you want to create the virtual directory.  

  2. Make sure ‘Windows Integrated authentication’ is enabled for the Web Site.  Open IIS admin and expand the tab for your local IIS server to find the virtual directory created above .  Right click this virtual directory and select ‘properties’, then Directory Security.  Click ‘Edit’ under Anonymous access and authentication control.  Check the box for Integrated Windows authentication.


  1.  Make sure SampleWeb (or whatever your Web project is called) is selected as the Startup Project.  Right click SampleWeb in Solution Explorer and select ‘Set as Startup Project’.

  2. Edit Page.xaml and find the following lines, change the rim:Map MDNSAddress and rim:TileLayer Descriptor to match the server and ID for the map you built in Studio:

                <rim:Map x:Name="myMap"

            <rim:TileLayer x:Name="MDNSTileLayer" Key="MDNSTileLayer" Descriptor="Sample"  

  1. You will probably want to remove the rim:TileLayer named MDNSTileLayerWithBase.  If you remove this, you should also remove the following markup:

    <RadioButton Name="showMyBaseMap" GroupName="BL" Content="My Basemap" Checked="BaseLayerChecked"
    IsChecked="{Binding ElementName=MDNSTileLayerWithBase, Path=IsVisible, Mode=OneWay}" Style="{StaticResource ToggleStyle}" />

    In Page.xaml.cs, you'll want to remove references to "showMyBaseMap" in the BaseLayerChecked method.

    MDNSTileLayerWithBase.IsVisible = (key == "showMyBaseMap");
    MDNSTileLayer.IsVisible = (key != "showMyBaseMap");

  2. You are done! At this point you should be able to build and run your application, and it will display a map using the map file you constructed in MapDotNet UX Studio.   

How to address the missing mime type issue when deploying a Silverlight sample to a remote IIS.

If you get the following error when running your Silverlight sample:



1) Go to Site Properties -> HTTP Headers

2) Click MIME Types

3) Click New

4) Fill the follow fields:
    Extension: .xap
    MIME type: application/x-silverlight-app

5) Finished!