使用点接近警报存储在KML文件 [英] Proximity Alerts using points stored in a KML file

查看:152
本文介绍了使用点接近警报存储在KML文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前工作的一个Android应用程序。

I am currently working on an android application.

我试图建立一套基于存储在KML文件,分析和显示一个谷歌地图上的坐标的接近警报。我希望能够跟踪用户的位置,然后当他们这些点之一的一定距离内得到警报弹出。我已经通过使用硬codeD点成功的例子的工作,但现在想适应这个在KML使用点。

I am trying to set up an proximity alert based on a set of coordinates that are stored in a kml file, parsed and displayed on a google map. I want to be able to track the users location and then when they get within a certain distance of one of these points for an alert to pop up. I have worked through an example using hard coded points successfully but now would like to adapt this to use the points in the KML.

我已经广泛地寻找这方面的例子,并没有发现什么。

I have looked extensively for examples of this, and have found nothing.

如果有人能告诉我,如果这是可能的,或者我也许能找到如何做到这一点,我将不胜感激的例子!我是新来编程,我发现很难知道从哪里开始。

If anyone could tell me if this were possible, or where i might be able to find examples of how to do it i would be most grateful! I am new to programming and I am finding it hard to know where to start.

在此先感谢您的帮助!

Thanks in advance for any help!!

推荐答案

绝对有可能的,但你需要从KML手动提取点。看看 HTTP://$c$c.google.com/p/javaapiforkml/ ,或者只是阅读KML规范,任何方便的XML解析器解析它。如果你想使用的第一个库就可以通过源测试漫步,看看它是如何使用的。

Definitely possible, but you'll need to manually extract the points from the KML. Take a look at http://code.google.com/p/javaapiforkml/, or just read the KML spec and parse it with any convenient XML parser. If you want to use the first library you can wander through the source for the tests and see how it is used.

这篇关于使用点接近警报存储在KML文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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