使用c#windows窗体向地图添加数据? [英] adding data to map using c# windows form ?

查看:103
本文介绍了使用c#windows窗体向地图添加数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HELLO全部



请我尝试使用谷歌地图离线创建简单表格并使用简单数据库添加点到此地图以添加有关此点的信息,例如名称,位置和其他信息



i希望尽可能简单地创建它,使用c#和sql server作为数据库....



请告诉我应该从哪里开始:)



非常感谢:)

HELLO all

please i try to create simple form using google map offline and adding point to this map with simple database to add information about this point such as name , location , and other information

i want to create it as simple as possible , using c# and sql server as database ....

please tell me from where should i start :)

thanks alot :)

推荐答案

很难提供不知道你的技能水平的建议。



基本上,你需要将你的项目分成更小的部分并学习如何解决每个部分。

然后把它们全部放在一起。



开始时的东西:



*定义你的数据结构

这将在你的数据库和c#app中使用。



从数据库读取和写入数据

有关SQL命令,请参阅 SQL教程 [ ^ ]

DataTable [ ^ ]和 DataAdapter [ ^ ]可能是处理c#中数据的最简单方法。



*可以滚动和缩放的图像区域

为了正确显示大地图,您可能希望用户能够滚动和缩放。

使用PictureBox是一个选项带有缩放和滚动的PictureBox [ ^ ]

但是还有其他选项:缩放和平移图片 [ ^ ]

了解GDI +一般是个好主意欢迎使用GDI +常见问题解答 [ ^ ]



*将数据绘制到图像区域

您需要在地图上绘制您感兴趣的点。

这可以通过创建自己的继承自控件的类来完成

如何:从Control类继承 [ ^ ]

如何:开发简单的Windows窗体控件 [ ^ ]



这应该给你一个开始。
It is difficult to give advice not knowing the skill level you have.

Basically, you need to divide your project into smaller parts and learn how to solve each part.
Then put it all together in the end.

Something to start with:

* Define your data structure
This will be used both in your database and your c# app.

" Read and write data to and from the database
For SQL commands see SQL Tutorial[^]
DataTable[^] and DataAdapter[^] is probably the easiest way to handle the data in c#.

* Image area that can be scrolled and zoomed
In order to show a large map properly you will probably want the user to be able to scroll and zoom.
Using the PictureBox is one option PictureBox with zooming and scrolling[^]
But there are other options too: Zoom and pan a picture[^]
Knowing about GDI+ in general is a good idea Welcome to the GDI+ FAQ[^]

* Draw your data into the image area
You will need to draw your points of interest on the map.
This can be done by creating your own class that inherits from Control.
How to: Inherit from the Control Class[^]
How to: Develop a Simple Windows Forms Control[^]

This should give you a start.


这篇关于使用c#windows窗体向地图添加数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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