MapDotNet UX Studio is a desktop application that is used to configure connections to SQL Server. SQL Azure and SQL Server 2008/12/14 hosted on-premises are all supported. MapDotNet Studio can also import data with locations (latitude and longitude) from CRM into SQL Server.
Cloud-hosted EasyTerritory Enterprise edition deployments are generally managed by EasyTerritory staff. Every cloud-hosted Enterprise customer gets their own 1 GB SQL Azure database. This database holds internal EasyTerritory data structures, territory boundaries (if data sync is configured), and customer spatial information (from your CRM entities or other sources). EasyTerritory.com offers segregated databases to maximize security and performance for each customer.
On request, we will provide connection information to allow you to connect directly to your SQL Azure database, either through MapDotNet Studio or any other tool you wish to use. You will need to provide us with the IP or IP range you intend to connect from.
Note that the data sets made available to cloud-hosted Enterprise deployments includes data sets such as zip code boundaries that are shared across Enterprise instances. You will not have direct access to the database that hosts shared datasets.
Cloud-hosted EasyTerritory Standard deployments do not get their own database.
You will use SQL Server for the following common tasks:
- Reviewing your MapDotNet web service configuration
- Exporting data from CRM to SQL Server
- Adding a map layer to your MapDotNet web service configuration
- Launch MapDotNet UX Studio from your desktop or start menu. Click the ‘Add’ button in the Server Explorer:
- Enter your EasyTerritory.com MDN Map Service URL. (Contact us if you are unsure of the URL.)
IMPORTANT NOTE: Connecting to your EasyTerritory.com service may take 30 seconds or more if Census data is enabled. There are over 200+ layer configurations and it takes a moment to download everything. Be patient, it will load.
- Once the connection loads, you should see a map called EasyTerritory.
Click the down arrow to see a list of layers.
Right-click a layer, then click “Modify Layer.” Before opening the layer, the system will attempt to connect to the data source. This connection pulls a list of spatial tables for the data source; if it is large or remote this may take a while.
- Now you can review information about the server-side display of your layer.
From here you can easily change the color of lines and polygons. Labeling, classification, and point marker symbols are more complex and beyond the scope of this document. Note that these instructions are only applied to server-side layers.
Client-side layers pull only geometry from the MDN layer and rendering is done within the web browser.
“Visible” should always be set false for layers used with EasyTerritory. Otherwise details from layers marked visible on the server may be unexpectedly included with details from selected EasyTerritory server layers.
- Launch MapDotNet UX Studio from your desktop or start menu. At this point it should read “Studio Engine” in the Server Explorer dropdown.
- Click the data source icon to add your SQL Server data source.
Enter the connection information. The easiest way is generally to check “show” next to the password field and then select the stubbed-out connection string and paste yours in. Or you can enter the connection details individually.These instructions assume that either you are on-premises or you have provided us with your IP address. If neither is true, you’ll need to switch to your MDN Map Service URL as we did above before you can create this data source.
- If you previously switched to your MDN Map Service URL, switch back to “Studio Engine” under Server Explorer. Add a new Dynamics CRM data source for your Dynamics CRM instance. Note that you will need to use the internal names, not the display names, for your CRM entities and columns. These will always be in lower case.
NOTE: You will generally need a separate data source for each entity you want to import into SQL Server. You can list multiple entities, separated by columns, if the names of the latitude and longitude attributes are the same for all listed entities. However, a CRM data source usually takes a couple of minutes per entity to load!
- Right click the entity table under the data source and click export data.
- MapDotNet UX Studio will parse your spatial data and automatically generate the best extents for your data set.
On the source side, all your columns will be selected. Note that for entity references, you will see two columns. [reference name]_crmFK will hold the referenced record’s key value, while [reference name]_crmName will hold the referenced record’s name. You may deselect columns if they will not be needed in EasyTerritory.
On the target (destination) side:
- Switch “Server” from Studio Engine to your service if you had to do that at step 2.
- Select your SQL Server data source.
- Leave “Create” as the operation and enter a name for your table.
- Click start. A progress bar will appear. The data export may take considerable time if the volume of data is very large.
NOTE: If you make customizations to your entity in CRM, you will need to manually sync those changes to SQL Server. This process is similar to the initial import. Instead of using the “Create” operation you will use the “Update” operation. It requires that you select an existing table- the one you created above- and choose a column to compare records for uniqueness as the Unique ID column. You should choose your CRM primary key for the entity.
This process will provide you the opportunity to copy newly added columns to the SQL table. To maintain data changes, you can use our CRM plugin to synchronize your data.
Once you’ve created tables, you’ll need to add those tables to your MapFile.
- Follow the first three steps from Reviewing your MapDotNet web service configuration above.
- In Studio, right click on your EasyTerritory map listing and click ‘Add Layer’. You will need to select the data source, select a data table, and enter a name for the map layer.
Do not try to connect directly to CRM layers. CRM queries too slowly for map rendering.
- Open the layer, uncheck the Visible checkbox, click ‘OK’ and save the map. Repeat this process for every table you want to map. These steps are sufficient if you plan to use client-side layers. Server-side layers will generally require you to spend some time setting up server-side symbology, which is beyond the scope of this document.