无法添加对 Bing 地图的引用?

发布于 2025-01-03 10:23:42 字数 803 浏览 2 评论 0 原文

我试图使用 Bing 地图创建一个应用程序。我需要在其中添加两个参考库,

Microsoft.Maps.MapControl.Common.dll
Microsoft.Maps.MapControl.dll

我按照以下教程进行操作: http://www.codeguru.com/csharp/csharp/cs_misc/article.php/c18305__1/Working-with-Bing-Maps-in-Silverlight-and-Windows-Phone-7-Applications。 htm

但是当我从 Bing 地图安装 BingMapAppSDK 时,它没有这些 api。 它确实有库,

    Microsoft.Maps.Core;
    Microsoft.Maps.MapControl;
    Microsoft.Maps.MapControl.Types;
    Microsoft.Maps.Plugins;

但没有上面的库。因此,我无法使用 Bing 地图。

我正在使用 Visual Studio 2010 并创建 Silverlight 应用程序并安装 Silverlight 5。

请建议。

I was trying to create an app using Bing Map. in which i need to add two reference libraries

Microsoft.Maps.MapControl.Common.dll
Microsoft.Maps.MapControl.dll

I followed the tutorial from : http://www.codeguru.com/csharp/csharp/cs_misc/article.php/c18305__1/Working-with-Bing-Maps-in-Silverlight-and-Windows-Phone-7-Applications.htm

But when i installed BingMapAppSDK from Bing Maps it didn't have these api.
It does have libraries

    Microsoft.Maps.Core;
    Microsoft.Maps.MapControl;
    Microsoft.Maps.MapControl.Types;
    Microsoft.Maps.Plugins;

But not the above ones.. Due to this i am not able to use Bing Maps.

I am using Visual Studio 2010 and creating Silverlight app and Silverlight 5 is installed.

Please suggest.

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

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

发布评论

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

评论(3

段念尘 2025-01-10 10:23:42

您必须添加服务参考。

1.右键单击“引用”,然后添加服务引用。
然后从此处复制您要使用的四个链接之一。
http://msdn.microsoft.com/en-us/library/cc966738.aspx

  1. 点击“开始”。

  2. 根据你的名字来命名。

  3. 现在尝试添加命名空间
    就像

使用 ProjectName.GeocodeService 一样;

使用项目名称.ImageryService;

希望这有帮助。

You have To add a Service Reference.

1 . Right click on "reference" and then Add Service Reference.
then copy one of the four links from here which you want to use.
http://msdn.microsoft.com/en-us/library/cc966738.aspx

  1. Click on go .

  2. Name it according to you .

  3. Now try to add namespaces
    like

using ProjectName.GeocodeService;

using ProjectName.ImageryService;

Hope This helps.

黑寡妇 2025-01-10 10:23:42

不同的平台有不同的 Bing 地图 SDK,但令人困惑的是,它们确实共享相当相似的命名空间。从您的帖子中确实不清楚您要针对哪个平台...

请注意,还有用于 iOS、Android 和 WPF 开发以及传统 AJAX 控件的专用 Bing 地图 SDK。

There are different Bing Maps SDKs for different platforms although, confusingly, they do share rather similar namespaces. It's really unclear from your post which platform you're trying to target...

Note that there are also dedicated Bing Maps SDKs for iOS, Android, and WPF development, as well as the traditional AJAX control.

苦笑流年记忆 2025-01-10 10:23:42

dll 的名称可以与它们提供的命名空间不同。如果我正确理解你的问题,那么你已经可以访问你需要的一切了。这四个库是您制作应用程序所需的库,而 dll 文件是您已经用来访问这些命名空间的库。

在您列出的示例链接中,他展示了如何通过执行以下操作来引用地图控件名称空间:

xmlns:m="clr-namespace:Microsoft.Maps.MapControl; assembly=Microsoft.Maps.MapControl"

在这种情况下,程序集(dll 文件)和名称空间是相同的,但它们不必是这样,那就是为什么要单独指定它们。

从这里,只需添加地图控件即可。

<m:Map CredentialsProvider="Your_Credentials" />

The name of the dll's can be different from the namespaces they provide. If I understand your question correctly, you already have access to everything you need. The four libraries are what you need to make your apps, while the dll files are what you are already using to get access to those namespaces.

In the example link you listed, he shows how make a reference to the map control namespace by doing the following:

xmlns:m="clr-namespace:Microsoft.Maps.MapControl; assembly=Microsoft.Maps.MapControl"

In this case, the assembly (dll file) and the namespace are the same, but they don't have to be and thats why they are specified separately.

From here, just add the map control.

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