MapX 设置投影。
来源:互联网 发布:软件定制公司 编辑:程序博客网 时间:2024/05/08 18:18
/*
MapInfo Products Knowledge Base
Product: MapX
Version: 4.x
Platform: Windows 9598 & Windows NT
Category: VC++ Code Samples
Summary:
Setting a projection through code in VC++ with MapX.
Question:
Is it possible to set the map projection to one of the projections listed in the CoordSys.PickCoordSys(..) dialog through code?
Answer:
Yes, it is possible to set a projection through code. Below is a sample of this using the CoordSys.Set(..) method.
*/
try
{
CMapXDatum datum;
CMapXRectangle rect;
CMapXAffineTransform aForm;
//Set the datum to the number specified by the second entry in the Mapinfow.prj file, in this case it is 62
datum.CreateDispatch(datum.GetClsid());
datum.SetFromList(62);
COleVariant EmptyParam; //<--Used for variables which are not used in the CoordSys.Set(..)
// method for any given projection.
VARIANT Bound, AffineTrans; //<--Used to satisfy the Bounds and AffineTransform object
// passed into the CoordSys.Set(..) method.
//Set up the VARIANT objects
EmptyParam.dblVal = 0;
Bound.vt = VT_DISPATCH;
Bound.pdispVal = rect.m_lpDispatch;
AffineTrans.vt = VT_DISPATCH;
AffineTrans.pdispVal = aForm.m_lpDispatch;
//Change the projection to a custom projection or one listed in the Mapinfow.prj file. In this case
//the projection is changed to ""--- Projections of the World ---": "Mercator", 10, 62, 7, 0"
try
{
m_ctrlMapX.GetDisplayCoordSys().Set(10,
datum, COleVariant("7"), COleVariant("0"), EmptyParam, EmptyParam, EmptyParam, EmptyParam,
EmptyParam, EmptyParam, EmptyParam, EmptyParam, Bound, AffineTrans);
}
catch (COleDispatchException *e)
{
e->ReportError();
e->Delete();
}
- MapX 设置投影。
- mapx
- MapX之VC设置非地球坐标系
- MapX之VC设置非地球坐标系
- DirectX设置正交投影矩阵
- 多个投影的设置
- android-给字体设置投影
- 投影
- 投影
- 投影
- 投影
- 投影
- 投影
- 设置投影和XYDoMain的功能
- 设置投影模式+Nehe第20课掩膜
- CSS基础:div设置透明度、圆角、投影
- ArcGIS---如何为shape文件设置投影
- Android OpenGL ES 投影矩阵的设置
- Scheme 与 CAML 的比较 http://learn.tsinghua.edu.cn:8080/2001315450/wiki/SchemeCaml.html
- ubuntu 7.04 IP设置
- [c/c++]析构函数virtual相关
- CSDN的登录系统之用户体验测试
- Gnu Common Lisp for Microsoft Windows http://www.cs.utexas.edu/users/novak/gclwin.html
- MapX 设置投影。
- 英文简历中的常用语
- 看日剧
- 什么是模式?什么是框架?
- Apache启动错误
- 作业5
- 实现操作xml文件的类
- MapX 创建位图样式符号。
- Windows 验证错误解决方法