User Tools

Site Tools


map_suite_spatial_data_extension_quick_start_guide

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
map_suite_spatial_data_extension_quick_start_guide [2015/09/16 09:19]
admin [What Are the Assemblies and Where Are They From?]
map_suite_spatial_data_extension_quick_start_guide [2015/09/16 09:46] (current)
admin [Map Suite Spatial Data Extension Hello World Sample]
Line 69: Line 69:
 Let's start with a new Windows Forms project in the Visual Studio.NET 2008 IDE. You can choose .NET Framework 4.5, 4.0, 3.5, 3.0 or 2.0. Three additional steps also need to be performed as described below: Let's start with a new Windows Forms project in the Visual Studio.NET 2008 IDE. You can choose .NET Framework 4.5, 4.0, 3.5, 3.0 or 2.0. Three additional steps also need to be performed as described below:
  
-#Make sure Map Suite Services Edition, Desktop Edition, Web Edition or Silverlight Edition is installed, either an evaluation or full version. We will automatically install Map Suite Desktop Evaluation Edition for you during the installation of the Spatial Data Extension. +  -Make sure Map Suite Services Edition, Desktop Edition, Web Edition or Silverlight Edition is installed, either an evaluation or full version. We will automatically install Map Suite Desktop Evaluation Edition for you during the installation of the Spatial Data Extension. 
-#Make sure that the folder //​MapSuiteSpatialDataExtension//​ exists in your Windows operating system'​s //​system32//​ folder. It will automatically be created during the installation of the Spatial Data Extension. +  -Make sure that the folder //​MapSuiteSpatialDataExtension//​ exists in your Windows operating system'​s //​system32//​ folder. It will automatically be created during the installation of the Spatial Data Extension. 
-#Copy "​pe.dll",​ "​sde.dll",​ and "​sg.dll"​ from your ArcSDE Server 9.3 installation folder to your Windows operating system'​s //​system32\MapSuiteSpatialDataExtension//​ folder.+  -Copy "​pe.dll",​ "​sde.dll",​ and "​sg.dll"​ from your ArcSDE Server 9.3 installation folder to your Windows operating system'​s //​system32\MapSuiteSpatialDataExtension//​ folder.
  
 **Note: If you are using the Map Suite Spatial Data Extension version 7.0.0.0 or later, you also need to add "​WindowsBase.dll"​ to the references. WindowsBase can be found on the .NET tab of the Add Reference dialog. ​ If you don't do this, you will get the following error when you compile the project:** **Note: If you are using the Map Suite Spatial Data Extension version 7.0.0.0 or later, you also need to add "​WindowsBase.dll"​ to the references. WindowsBase can be found on the .NET tab of the Add Reference dialog. ​ If you don't do this, you will get the following error when you compile the project:**
 +
 //"The type '​System.Collections.Specialized.INotifyCollectionChanged'​ is defined in an assembly that is not referenced. You must add a reference to assembly '​WindowsBase,​ Version=3.0.0.0,​ Culture=neutral,​ PublicKeyToken=31bf3856ad364e35'​."//​ //"The type '​System.Collections.Specialized.INotifyCollectionChanged'​ is defined in an assembly that is not referenced. You must add a reference to assembly '​WindowsBase,​ Version=3.0.0.0,​ Culture=neutral,​ PublicKeyToken=31bf3856ad364e35'​."//​
  
 ===== Map Suite Spatial Data Extension "Hello World" Sample ===== ===== Map Suite Spatial Data Extension "Hello World" Sample =====
 +
 (Note: We are using Map Suite Services Edition for the purposes of this example. If you have installed a different edition of Map Suite, the steps here will be similar.) (Note: We are using Map Suite Services Edition for the purposes of this example. If you have installed a different edition of Map Suite, the steps here will be similar.)
  
-:1. How to display a map using ArcSDE data:  + 1. How to display a map using ArcSDE data:  
-::a. Add the "​MapSuiteSpatialDataExtension.dll"​ reference to your project. +\\ 
-::b. Add the following code:+  a. Add the "​MapSuiteSpatialDataExtension.dll"​ reference to your project. 
 +\\ 
 +  b. Add the following code:
  
-<source lang="csharp">+<code csharp>
   private void Sample_Load(object sender, EventArgs e)   private void Sample_Load(object sender, EventArgs e)
     {     {
Line 90: Line 94:
         string username = "​username"; ​           ​         string username = "​username"; ​           ​
         string password = "​password";​         string password = "​password";​
-        string datastore = "​master"; ​          <​nowiki>​//</​nowiki> ​Case-Sensitive. +        string datastore = "​master"; ​          // Case-Sensitive. 
-        string idColumnName = "​OBJECTID"; ​     ​<​nowiki>​//</​nowiki> ​Case-Sensitive. +        string idColumnName = "​OBJECTID"; ​     // Case-Sensitive. 
-        string schemaName = "​master_dbo"; ​     ​<​nowiki>​//</​nowiki> ​Case-Sensitive. +        string schemaName = "​master_dbo"; ​     // Case-Sensitive. 
-        string featureClassName = "​Tablename"; ​<​nowiki>​//</​nowiki> ​Case-Sensitive. +        string featureClassName = "​Tablename";​ // Case-Sensitive. 
-        string geometryColumnName = "​Shape"; ​  <​nowiki>/​/</nowiki> ​Case-Sensitive.+        string geometryColumnName = "​Shape"; ​  // Case-Sensitive.
         ArcSdeFeatureLayer layer = new ArcSdeFeatureLayer(serverIP,​ port, username, password, datastore, idColumnName,​ schemaName, featureClassName,​ geometryColumnName);​         ArcSdeFeatureLayer layer = new ArcSdeFeatureLayer(serverIP,​ port, username, password, datastore, idColumnName,​ schemaName, featureClassName,​ geometryColumnName);​
         layer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;​         layer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;​
Line 113: Line 117:
         engine.CloseAllLayers();​         engine.CloseAllLayers();​
     }     }
-</source> +</code>
- +
-:**Notes:**+
  
-:If you don't know the proper values of the SchemaName and FeatureClassName parameters, then you can set them to <​code>​String.Empty</​code>​ and use some special functions to list the available SchemaNames and FeatureClassNames. For SchemaName, use the <​code>​layer.GetFeatureSchemaNames();</​code>​ function to get a schema name list, from which you can choose a SchemaName. For FeatureClassName,​ use <​code>​layer.GetFeatureClassNamesBySchema(string featureSchemaName)</​code>​ to get a feature class name list, from which you can choose a FeatureClassName. After performing these two steps, change the SchemaName and FeatureClassName parameters to the actual values. ​+** Notes**
  
-:2. How to perform the ExecuteQuery operation for ArcSDE Server:  +If you don't know the proper values of the SchemaName and FeatureClassName parameters, then you can set them to ''​String.Empty''​ and use some special functions to list the available SchemaNames and FeatureClassNames. For SchemaName, use the ''​layer.GetFeatureSchemaNames();''​ function to get a schema name list, from which you can choose a SchemaName. For FeatureClassName,​ use ''​layer.GetFeatureClassNamesBySchema(string featureSchemaName)''​ to get a feature class name list, from which you can choose a FeatureClassName. After performing these two steps, change the SchemaName and FeatureClassName parameters to the actual values.  
-::a. Complete the same steps as shown in the "How to display a map using ArcSDE data" section above. +   
-::b. Use <​code>​layer.Open();​</​code> ​to open the layer. + 2. How to perform the ExecuteQuery operation for ArcSDE Server:  
-::c. Use <​code>​layer.QueryTools.ExecuteQuery(string sqlStatement);​</​code> ​to perform the execute query operation for ArcSDE Server.+\\ 
 +  a. Complete the same steps as shown in the "How to display a map using ArcSDE data" section above. 
 +\\ 
 +  b. Use ''​layer.Open();​'' ​to open the layer. 
 +\\ 
 +  c. Use ''​layer.QueryTools.ExecuteQuery(string sqlStatement);​'' ​to perform the execute query operation for ArcSDE Server.
  
-:3. Because many properties for an ArcSDE Server are case sensitive, please be careful and always ensure that you are using the proper case. Issues with incorrect case are the most common cause of errors.+ 3. Because many properties for an ArcSDE Server are case sensitive, please be careful and always ensure that you are using the proper case. Issues with incorrect case are the most common cause of errors.
  
map_suite_spatial_data_extension_quick_start_guide.1442395161.txt.gz · Last modified: 2015/09/16 09:19 by admin