在wpf控件中嵌入谷歌地图 [英] embed google map in wpf control

查看:198
本文介绍了在wpf控件中嵌入谷歌地图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正尝试创建一个wpf控件,它将使用Google地图显示地图图像。我希望能够将地图定位在应用程序指定的经度和纬度上。理想情况下,控件将允许用户移动地图标记并将标记的纬度/经度存储在应用程序中。

I am trying to create a wpf control that will display a map image using google maps. I want to be able to centre the map on a longitude and latitude specified by the application. Ideally, the control will then allow the user to move a map marker and store the latitude/longitude of the marker in the application.

我能想到的唯一方法就是做这是使用WebBrowser控件并在运行时创建一个HTML字符串,它显示所需位置的地图。这似乎是一个尴尬的解决方案,不会让我轻松检索标记位置。有谁知道有更好的方法来完成这个吗?

The only way I can think of doing this is to use a WebBrowser control and create a HTML string at runtime that shows a map of the desired location. This seems like an awkward solution and won't allow me to easily retrieve the marker location. Does anyone know of a better way to accomplish this?

推荐答案

使用XAML
http://code.google.com/apis/maps/articles/flashmapinwpf.html

这篇关于在wpf控件中嵌入谷歌地图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆