AddDataSource
Adds a specified model layer in point shapefile format for inclusion in the 3DML.
C# |
|
int AddDataSource( string title, string path, string modelPath, string projectionWKT = null, string altitudeOffset = null, string scaleX = null, string scaleY = null, string scaleZ = null, string yaw = null, string pitch = null, string roll = null, dynamic sgworldForTerrainRelativeAltitude = null, bool useZValue = false, AltitudeUnitTypeCode zValueUnitsCode = AltitudeUnitTypeCode.Meters) |
Parameters
title
Name of the 3DML layer in which the layer is being included.
path
Path to the model layer in point shapefile format that is being added.
modelPath
This parameter can be any of the following:
· Name of the attribute field in brackets that designates which model to place at each of the point layer’s points, e.g., [MODEL NAME]
· A textual expression that consists of the attribute name in brackets preceded or followed by other text (e.g., Text Before c:\mymodels\[MODEL_NAME].x).
· Path to a 3D model file that is to be placed at each of the point layer’s points.
projectionWKT
The Well-Known Text representation of the layer's coordinate system.
altitudeOffset
The altitude for the 3D model’s pivot point. If there is a Z value, this value is added to each Z-coordinate.
This parameter can be either of the following:
· A constant number value.
· An attribute value in brackets.
scaleX
The value by which to scale the x value of the models being placed at each of the point layer's points to derive the models' actual x values in the 3D World (i.e., if the model has an x value of 5 units and the scaleX is set to 10 meters per pixel, the x value of the object in the 3D World is 50 meters).
This parameter can be either of the following:
· A constant number value.
· An attribute value in brackets.
scaleY
The value by which to scale the y value of the models being placed at each of the point layer's points to derive the models' actual y values in the 3D World (i.e., if the model has a y value of 10 units and the scaleY is set to 10 meters per pixel, the y value of the object in the 3D World is 100 meters.)
This parameter can be either of the following:
· A constant number value.
· An attribute value in brackets.
scaleZ
The value by which to scale the z value of the models being placed at each of the point layer's points to derive the models' actual z values in the 3D World. (i.e., if the model has a z value of 5 units and the scaleZ is set to 10 meters per pixel, the z value of the object in the 3D World is 50 meters.)
This parameter can be either of the following:
· A constant number value.
· An attribute value in brackets.
yaw
Direction angle of the models being placed at each of the point layer's points, along their vertical axis relative to north.
This parameter can be either of the following:
· A constant number value.
· An attribute value in brackets.
pitch
Tilt angle of the models being placed at each of the point layer's points, along their lateral axis relative to the horizon.
This parameter can be either of the following:
· A constant number value.
· An attribute value in brackets.
roll
Roll angle of the models being placed at each of the point layer's points, along their longitudinal (front-to-back) axis.
This parameter can be either of the following:
· A constant number value.
· An attribute value in brackets.
sgworldForTerrainRelativeAltitude
Reserved. Always pass null for this parameter. The API only supports layers with absolute altitude values.
useZvalue
A Boolean that determines whether the layer's z-coordinate value is used.
zValueUnitsCode
An enum that indicates in which z-coordinate units of measurement the model was created. The AltitudeUnitTypeCode enum can use any of the following values:
§ Meters = 0
§ Feet = 1
§ Centimeters = 2
§ Decimeters = 3
§ Inches = 4
§ Yards = 5
Return Value
An integer that represents the index value of the added layer.