This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
map_suite_spatial_data_extension_quick_start_guide [2015/09/16 09:28] admin [Map Suite Spatial Data Extension Hello World Sample] |
map_suite_spatial_data_extension_quick_start_guide [2015/09/16 09:46] (current) admin [Map Suite Spatial Data Extension Hello World Sample] |
||
---|---|---|---|
Line 78: | Line 78: | ||
===== 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: | ||
<code csharp> | <code csharp> | ||
Line 91: | 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 116: | Line 119: | ||
</code> | </code> | ||
- | **Notes:** | + | ** 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. | + | 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. |
| | ||
- | 2. How to perform the ExecuteQuery operation for ArcSDE Server: | + | 2. How to perform the ExecuteQuery 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 <code>layer.Open();</code> to open the layer. | + | a. Complete the same steps as shown in the "How to display a map using ArcSDE data" section above. |
- | c. Use <code>layer.QueryTools.ExecuteQuery(string sqlStatement);</code> to perform the execute query operation for ArcSDE Server. | + | \\ |
+ | 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. |