C#中的GPS应用程序帮助 [英] Help with GPS application in C#

查看:107
本文介绍了C#中的GPS应用程序帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请每个人我都想使用C#在ASP.NET中编写GPS应用程序,我的公司为我提供了GPS ENFORA TRACKER.对我的期望是,该应用程序向跟踪器发送一个AT命令,以请求车辆的当前GPS坐标,ENFORA TRACKER以经度和纬度返回信息,然后在Google Map中填充并显示在MAP

注意:我是否必须在此处使用端口.

请帮助

Please every-one I want to write a GPS Application in ASP.NET using C#, My company provide me with an GPS ENFORA TRACKER. What is expected of me is that the application sends an AT Command to the tracker requesting for the current GPS coordinate of a vehicle, the ENFORA TRACKER return the info in Longitude and Latitude, Google Map then Populate it and display it on the MAP

NOTE: Do I have to work with port here.

Please help

推荐答案

我认为您可能需要澄清您要做什么,或者评估您是否在使用正确的工具工作.

如果要创建客户端应用程序,为什么ASP.NET会起作用? GPS设备与网络服务器有关系吗?

如果您使用的是ASP.NET,则它不太可能在客户端计算机上运行,​​因此您所要处理的只是服务器端的坐标.结合使用任何Google Maps示例,您将在几分钟之内找到一个简单的JavaScript解决方案.

在客户端,除了从浏览器中收集GPS坐标外,您无需执行其他任何操作.同样,您将不需要在这里了解GPS设备,因为您无法从浏览器访问它.您将必须采取任何可以给您的地理位置.

谢谢.
I think you might need to clarify what you''re trying to do, or evaluate whether or not you''re using the right tools for the job.

If you''re creating a client application, why does ASP.NET come into play? And does the GPS device have anything to do with the web server?

If you''re working on ASP.NET, it won''t likely be running on the client machine, so all you''re dealing with is the co-ordinates on the server side. Use those with any Google Maps sample and you''ll have a simple JavaScript solution in place in minutes.

On the client side, you won''t need to do anything other than collect the GPS co-ordinates from the browser. Again, you won''t need to know about the GPS device here as you can''t access it from the browser; you''ll have to take whatever the geolocation will give you.

Cheers.


感谢您对问题的澄清.

听起来像是以下内容:
1)您正在创建将通过某些第三方设备定位车辆的功能.您可以通过串口查询此信息,它会返回GPS坐标.
2)您还将创建一个可以查看车辆坐标的Web前端.

这是我的建议:
1)分离应用程序.如果您定期(例如每分钟一次)在服务应用程序中轮询设备并将结果存储在数据库/内存中,将会有更好的体验.从用户角度考虑这一点:如果您打算完全成长,并且有10个人同时点击该页面,并且您正在执行按需加载,那么您将遇到各种数据访问问题.您的串行端口将很快成为瓶颈.
2)在您的Web应用程序中,使用jQuery(或其他JS库)在#1的服务器轮询中及时加载坐标.在这种情况下,您只是从数据库中读取;非常简单.
3)确保您了解映射应用程序中的许可.如果您不免费提供必应地图,则不能免费使用Bing Maps或Google Maps.

至于连接设备,请尝试与制造商联系.它们将具有命令列表或可用于与设备通信的SDK.同样, MSDN [
Thanks for some clarification on your question.

What it sounds like is the following:
1) You''re creating a functionality that will locate vehicles through some third-party device. You can query this via serial port and it will return GPS co-ordinates.
2) You''re also creating a web front-end that can view the co-ordinates of the vehicles.

Here''s my recommendation:
1) Separate the apps. You''ll have a better experience if you poll the device periodically (say once a minute) in a service application and store the results in a DB/memory. Think about this from a user perspective: if you intend to grow at all, and 10 people hit the page at once and you''re doing on-demand loading, you''ll run into all kinds of problems with data access. Your serial port will become a bottleneck very quickly.
2) In your web app, use jQuery (or another JS library) to load your co-ordinates in time with the server polling from #1. You''re only reading from the DB in this case; very easy.
3) Make sure you understand your licencing in the mapping applications. You can''t use Bing Maps or Google Maps for free if you don''t provide free access to your maps.

As far as connecting to the device, try contacting the manufacturer. They will have a list of commands, or an SDK that you can use to communicate with the device. As well, the MSDN[^] docs on SerialPort are actually pretty good and will point you in the right direction. If you have specific questions, please do not hesitate to ask.

Cheers.


这篇关于C#中的GPS应用程序帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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