Skip to main content

Reference Library

Go Search
Reference Library
  
Reference Library > Wiki Pages > Connecting to data  

Connecting to data

Overview
 
After installing the MapDotNet Server SDK and Web Services, connecting to your spatial data is simple.
 
Creating an Application from a Template

The quickest way to get a MapDotNet Server application running is using an out-of-the-box MapDotNet Server Template.  The MapDotNet Server SDK installer places a C# template in the Visual Studio Templates directory. By default, the template connect to a remote map web service running on public.mapdotnet.com.

Steps:
 
1. Launch Microsoft Visual Studio 2005

2. Navigate to File -> New -> Website

3. Choose a C# template for MapDotNet Server:
 
templates
 
"MDNS 6.5 Web Site" is a full-featured MapDotNet Server web application.  "MDNS_6.5_VE_Web_Site" utilizes and extends Microsoft's VirtualEarth control (details).

4. Once the template loads, the application should run out of the box as they point to preconfigured public MapDotNet Server Web Services.
 
Note: Depending on your setup, additional configuration may be necessary for the VirtualEarth template (for example, using SQL Server rather than SQL Express).  For details, see  the white paper.

 
Connect to Your Spatial Data
 
After getting a template up and running you'll probably next want to connect to your GIS data.  The easiest way to build a map that connects to your Shapefile, ArcSDE, SpatialDB or PostGIS data is by using the MapDotNet Server MapFile Generator.  If you have not already done so follow the steps outlined on the MapFile Generator Tutorial.

Finally, you can point your MapControlBridge to your MapDotNet Server web services.  This is done by setting the WebServiceURL and MapID properties.  A helpful dialog for setting this is available through the MapControlBridge tasks.  Click the arrow on the MapControlBridge:
 
MCB Tasks
 
This will open a drop-down list.  Select 'Configure Services'.  This will provide a dialog for connecting to a MDNS Web Service and selecting a MapID:
 
MCB Dialog
 
Set the MapDotNet Server URL to point to your local instance and select your map.  A thumbnail should appear.  Click 'OK' to set the MapControlBridge to this map.
 
Microsoft VirtualEarth Users
 
For the VE Web Site, an additional step must be done to configure a new web service/map ID.  The tile database table tblConfig must be updated with this information.
 
 
Next Steps
 
At this point, you should have a simple MDNS web site up and running and pointing to your data.  From here, you may want to use the Interactive SDK to enhance or customize your application.

 

Last modified at 11/11/2008 6:09 PM  by WEB\mark