This project is read-only.
Getting Started with GISforTT

If you already have Visual Studio 2010 installed, you only need to download the latest API version from the source code page.
You can find an overview of the user interface features provided by the API here.

Start Developing:

After downloading the API, run Visual Studio 2010 and open the API Visual studio solution. Compile the solution to generate the dlls of the API. Then create your own solution and project by opening the new projects dialog box. Create a WPF application and add the dlls of the API to the references folder of the new project. The dlls you may need are found in this folder:


The main dll of the API is GISforTT_API.dll. In addition to this dll, you will find dlls of the Touch Toolkit, Surface Toolkit and the ESRI ArcGIS API. As an alternative to adding the API's .dll files, you can create a new WPF project within the GISforTT solution, make your project the startup project, and add GISforTT_API as a project reference.

In the GISforTT project, you will find an example application called eGrid. In this application you can find more examples of how to use the API and some more advanced features. Your new project will have a MainWindow.xaml and its associated MainWindow.xaml.cs. In the .xaml file make sure to define a canvas (rather than a grid). For example:

<Window x:Class="SampleApp.MainWindow"

    <Canvas Name="LayoutRoot" Background="White"/>

Feel free to define all the widgets that you will add to your application.

In the .xaml.cs file, remember to include the API:

using GISforTT_API;

In the constructor of the MainWindow, define a Loaded event handler, as follows:

public MainWindow()

   this.Width = System.Windows.SystemParameters.VirtualScreenWidth;
   this.Height = System.Windows.SystemParameters.VirtualScreenHeight;
   this.Left = 0;
   this.Top = 0;
   this.ResizeMode = ResizeMode.NoResize;
   this.Loaded += new RoutedEventHandler(MainWindow_Loaded);

In the event handler you can define the GIS interface manager of the API and customize any other interface features. The following is an example and you can find details about customizations in the links below.

private void MainWindow_Loaded(object sender, RoutedEventArgs e)
   GisInterfaceMgr bgm = GisInterfaceMgr.Instance;

   // Map Layers
   List<MapLayerDef> defaultMapLayers = new List<MapLayerDef>();
   defaultMapLayers.Add(new MapLayerDef(MapLayerDef.MapLayerType.SatelliteImagery));
   defaultMapLayers.Add(new MapLayerDef(MapLayerDef.MapLayerType.OnlinePublishedMap, "NewPublishedLayer", 
   defaultMapLayers.Add(new MapLayerDef(MapLayerDef.MapLayerType.OfflineAnnotationLayer));

   // Add GisInterfaceMgr object to the interface

Customize the Interface

Last edited Jul 11, 2011 at 11:06 PM by ealafselim, version 22


No comments yet.