阅读:2103回复:8
[求助]请教ToMapPoint问题。
<P>请问:</P>
<P> Dim p as point </P> <P> Dim str1 as string: dim str2 as string</P> <P> set p=map1.ToMapPoint(100,200)</P> <P> str1=p.x : str2=p.y</P> <P> 为什么str1!=100 ,str2!=200??</P> <P> 请哪位大侠把ToMapPoint讲讲,英文的帮助看了半天也没有深刻理解。谢谢! </P> |
|
1楼#
发布于:2004-08-28 17:39
<P>系统坐标和地图坐标、系统距离和地图距离是两回事</P><P>tomappoint(x,y)就是把系统坐标转化为地图坐标然后赋给一个mapobjects2.point 对象</P>
|
|
|
2楼#
发布于:2004-08-30 08:13
相等才怪!
|
|
3楼#
发布于:2004-08-30 09:12
因为100和200是屏幕坐标,tomappoint变为地图坐标了
|
|
|
4楼#
发布于:2004-08-30 10:42
<P>谢谢,搞懂了。</P>
|
|
5楼#
发布于:2004-09-03 14:17
tomappoint一般捕捉鼠标的信息吧
|
|
6楼#
发布于:2004-09-06 10:52
<P>不一定是鼠标的信息,只是转换坐标,当然有可能坐标是当前的鼠标点。</P>
|
|
|
7楼#
发布于:2004-09-14 14:47
数据类型都不一样
|
|
8楼#
发布于:2004-09-14 15:45
<P>最好看看帮助文件...</P><P>Converts a point in control space to map coordinates.
</P><P>If you have changed the Scale units of your Map container: The ToMapPoint method is dependant upon the ScaleMode of the Map control's container. However, the internal control units of a Map control are Twips, and therefore the ToMapPoint converts units from Twips to Map units. In Visual Basic, if the Map control's container has a different ScaleMode, use the ScaleX and ScaleY methods to convert X and Y coordinates before using the ToMapPoint method. For more information on the ScaleX and ScaleY methods, see the Visual Basic online reference.</P> |
|