[英]How to display (publicly available i.e. non-local) KML file on a Google Map (Android fragment)
I am trying to find a way to display a KML layout over a Google Map in my Android application. 我正在尝试寻找一种在Android应用程序中的Google Map上显示KML布局的方法。 The KML file itself is hosted on Google App Engine (publicly accessible).
KML文件本身托管在Google App Engine(可公开访问)上。 I have seen many posts regarding manually parsing locally-stored KML files, but it isn't clear to me if this is something you only have to do if you are trying to display a local KML file.
我已经看到很多有关手动解析本地存储的KML文件的帖子,但是我不清楚这是否只是在您试图显示本地KML文件时要做的事情。 However, I have not seen any evidence of a different straight-forward way to display publicly available KML files.
但是,我没有看到任何证据来显示公开可用的KML文件的另一种直接方法。 Google's KML support for Google Maps Mobile ( https://developers.google.com/kml/documentation/mapsSupport#googlemapsformobile ) seems to imply that displaying KML files directly in Google Maps is indeed supported.
Google对Google Maps Mobile的KML支持( https://developers.google.com/kml/documentation/mapsSupport#googlemapsformobile )似乎暗示着确实支持直接在Google Maps中显示KML文件。
Is there any way to display a publicly accessible (by public URL) KML layer file over a Google Map in Android without manually parsing the file??? 有没有办法在不手动解析文件的情况下在Android的Google Map上显示可公开访问(通过公共URL)的KML图层文件???
如果您想显示两点之间的路线,这应该对您有帮助: http : //blog.synyx.de/2010/06/routing-driving-directions-on-android-part-1-get-the-route /
I had the same problem lately and the only solution I've seen was parsing the KML file. 最近,我遇到了同样的问题,我看到的唯一解决方案是解析KML文件。 It's not that complicated, KML is kind of a XML file, you know the tags and you can parse it easily.
并不是那么复杂,KML是一种XML文件,您知道标记并且可以轻松对其进行解析。
Google is trying to make it better and lately and they have built a new app for this. Google正在努力使它变得更好并且最近,他们为此构建了一个新的应用程序。 Look: https://play.google.com/store/apps/details?id=com.google.android.apps.m4b
外观: https : //play.google.com/store/apps/details?id = com.google.android.apps.m4b
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.