将 .NET 应用程序从 MapPoint 2004 升级到 2009

发布于 2024-08-22 04:29:35 字数 713 浏览 5 评论 0原文

我正在将 Visual Studio 2005 .NET (C#) 应用程序从与 MapPoint 2004 的集成升级到支持 MapPoint 2009。经过一番搜索和摆弄后,我使用“tldimp”和“aximp”生成了新的 DLL现在有了 Interop.MapPoint.dll 和 AxInterop.MapPoint.dll,并且命名空间似乎与之前的命名空间一致,因此所有对象定义都可用。

但是,我有很多错误告诉我各种属性不存在,即使我进入对象浏览器,它们似乎确实存在。

这是一个示例(有数十个类似的错误)...

axMappointControl1.ActiveMap.Altitude = 1000;

该对象初始化良好,作为 MapPoint.Map 对象,当我在对象浏览器中浏览到该对象时,我转到 MapPoint 和 Map,并且在 Map 下没有属性但是当我深入观察时,会发现 _Map80 和 _Map90 并且每个都有一个 Altitude 属性。在 Map 下,它还列出了“基本类型”,其中包含 _Map,其中也包含所有引用的属性!然而,我收到错误:

"MapPoint.Map' does not contain a definition for 'Altitude'

几乎 MapPoint.Map 和 MapPoint.Toolbars 的所有属性都在执行此操作。有什么想法吗?

谢谢你! 约书亚

I am in the process of upgrading a Visual Studio 2005 .NET (C#) application from it's integration with MapPoint 2004 to supporting MapPoint 2009. After a bit of searching and fiddling, I've generated new DLLs using "tldimp" and "aximp" and now have Interop.MapPoint.dll and AxInterop.MapPoint.dll and the namespaces seem to line up to the previous ones, so all the object definitions are available.

However, I have lots of errors telling me that various properties do not exist, even though I go into the Object Browser, and they do seem to exist.

Here is an example (there are dozens of similar errors)...

axMappointControl1.ActiveMap.Altitude = 1000;

That object initializes fine, as a MapPoint.Map object, which when I browse to in the Object Browser, I go to MapPoint and Map and under Map there are no properties but when I look deeper there is _Map80 and _Map90 and EACH of these has an Altitude property. Under Map it also lists "Base Types", which has _Map in it which also has all the referenced properties! Yet, I am getting the error:

"MapPoint.Map' does not contain a definition for 'Altitude'

Pretty much all the properties of both MapPoint.Map and MapPoint.Toolbars are doing this. Any ideas?

Thank you!
Joshua

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

是伱的 2024-08-29 04:29:35

好吧,我明白了。生成了第三个 DLL 文件,我不确定是通过哪个生成过程生成的。这个名为 MapPoint.dll(除了 AxInterop.MapPoint.dll 和 Interop.MapPoint.dll),并且这三个都是必需的。摆弄够了,它成功了。谢谢!

Okay, I figured it out. There was a THIRD DLL file produced, I'm not sure by which generative process. This one just called MapPoint.dll (in addition to AxInterop.MapPoint.dll and Interop.MapPoint.dll) and all three were needed. Enough fiddling and it worked. THANKS!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文