Can not add elevation to Point in vector layer
Hi,
I added a vector layer by GM_AddCustomVectorLayer then use GM_setLayerElevationAttribute and config for "Z" value for attribute of elevation.
But when added a point to my layer and show 3D view i can NOT show elevation point like Global mapper application.
Please help me..
tank you for your supports...
I added a vector layer by GM_AddCustomVectorLayer then use GM_setLayerElevationAttribute and config for "Z" value for attribute of elevation.
But when added a point to my layer and show 3D view i can NOT show elevation point like Global mapper application.
Please help me..
tank you for your supports...
Comments
-
Can you show me how you added the point so that I can see if you are setting up the elevation attribute correctly?
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Hi,
this is a method that I use for add point to layer....
Please guide me to create 3D view for my points...
thanks...
public unsafe bool AddPoint(string layerName, double latitude, double longitude, string symbolName, string caption,
int rotation, out int index)
{
bool ret;
string attName = "ELEVATION";
string attVal = "5000 m";
fixed (char* theAttrNamePtr = attName, theAttrValPtr = attVal)
{
var theAttrValList = new GM_AttrValue_t[1];
theAttrValList[0].mName = theAttrNamePtr;
theAttrValList[0].mVal = theAttrValPtr;
fixed (GM_AttrValue_t* theAttrValListPtr = &theAttrValList[0])
{
var pointFeatureT = new GM_PointFeature_t();
pointFeatureT.mPointStyle = new GM_PointStyle_t();
pointFeatureT.mPointStyle.mSymbolName = symbolName;
pointFeatureT.mPointStyle.mDrawLabelAlways = 1;
pointFeatureT.mPointStyle.mDrawLabel = 1;
pointFeatureT.mPointStyle.mRotation = (ushort) rotation;
pointFeatureT.mPointStyle.mScale = 0;
pointFeatureT.mPos.mX = longitude;
pointFeatureT.mPos.mY = latitude;
pointFeatureT.mFeatureInfo.mClass = (ushort)PointFeatureClass_t16.PFC_UNKNOWN;
pointFeatureT.mFeatureInfo.mName = caption;
pointFeatureT.mFeatureInfo.mAttrList = (IntPtr)theAttrValListPtr;
pointFeatureT.mFeatureInfo.mNumAttrs = 1;
LastError = GlobalMapperDLL.GM_AddPointToVectorLayer(_allLayersHandle[layerName], ref pointFeatureT, 0);
ret = LastError == GlobalMapperDLL.GM_Error_t32.GM_Error_None;
}
}
index = (int) GetLayerInfo(_allLayersHandle[layerName]).mNumPoints - 1;
DrawLayersToBitmap();
return ret;
} -
What are you using for 'symbolName'? Does the feature show up in the 2D view? Your code looks correct to me. If you check the Options dialog in the 3D view is the option checked to display vector features in 3D?
Thanks,
Mike
Global Mapper Support
support@globalmapper.com
Categories
- 12.7K All Categories
- 5.6K Features Discussion
- 342 Downloading Imagery
- 1.3K Elevation Data
- 380 Georeferencing Imagery Discussion
- 628 GM Script Language
- 53 User Scripts
- 113 GPS Features
- 414 Projection Questions
- 819 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 177 Announcement and News
- 908 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 562 Other Discussion
- 129 GIS Data Sources
- 27 Global Mapper Showcase
- 233 How I use Global Mapper
- 107 Global Mapper Forum Website