使用坐标在地图上显示 [英] Display on a map using coordinates

查看:93
本文介绍了使用坐标在地图上显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我目前正在使用SharpDevelop中的Windows表单应用程序连接到PostgreSQL数据库并查询大量信息以显示在datagridview上。



我的数据库中有关于城市及其地理坐标的信息。我想在每次生成datagridview时都在地图上显示这些坐标。



请记住,datagridview只显示城市名称和必须从数据库中提取坐标。



如何做到这一点?



任意帮助将不胜感激:)

解决方案

可能你必须使用第三方服务,如谷歌地图或绑定地图服务,但是,只显示一个地图时间,用户可能不需要同时看到所有地图,当然,这会更有效。



由于您使用的是Windows窗体,也许你可以使用浏览器控件显示一个带有地图的新窗口:



例如,根据一些LAT和LONG坐标显示一个小地图: br $> b $ b

< img src =http://maps.googleapis.com/maps/api/staticmap?center=-15 0.800513,-47.91378和缩放= 11&安培;大小= 200×200&安培;传感器=假>

Hi guys,

I am presently working on a Windows form application in SharpDevelop that connects to a PostgreSQL database and queries a bunch of information to display on a datagridview.

There is information on my database that has cities and their geographical coordinates. I would like to show these coordinates on a map every time a datagridview is generated along with the data.

Keeping in mind that the datagridview will display only the city names and the coordinates will have to be fetched from the database.

How can this be done?

Any help would be greatly appreciated :)

解决方案

Probably you would have to use an third party service like google maps or bind maps services, but, show only one map at the time, the user probably dont need to see all the maps at the same time, and of course, this would be more efficient.

Since you are using windows forms, maybe you can use the browser control to display a new window with the map:

For example, this will show a little map according to some LAT and LONG coordinates:

<img src="http://maps.googleapis.com/maps/api/staticmap?center=-15.800513,-47.91378&zoom=11&size=200x200&sensor=false">


这篇关于使用坐标在地图上显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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