如何将KML文件插入到android地图视图中?
我有一堆 kml 文件,例如这个文件,我一直在尝试将其作为地图视图叠加层插入到我的应用程序中。我知道我应该解析这个文件才能处理它。但我不确定解决这个问题的正确方法。非常感谢您的建议。
钳位接地 -77.91368,34.04805,-42.6 -77.91372,34.04801,-39.8 -77.91374,34.04796,-38.9 -77.91378,34.04792,-37 -77.91382,34.04788,-36.8 -77.91385,34.04783,-33.2 -77.91387,34.04779,-32.9 -77.91392,34.04775,-32.3 -77.91392,34.04769,-33.1 -77.91393,34.04763,-31.9 -77.91392,34.04758,-31.8 -77.91391,34.04752,-33.7 -77.91391,34.04747,-33.9 -77.91394,34.04742,-31.1 -77.91396,34.04737,-29.5 -77.91399,34.04733,-30.3 -77.91404,34.04731,-31.4 -77.9141,34.04731,-31.1 -77.91415,34.04734,-39.5 -77.9142,34.04736,-42.2 -77.91426,34.04736,-43.3 -77.91431,34.04734,-42.6 -77.91436,34.04731,-36.3 -77.91441,34.04728,-38.4 -77.91446,34.04727,-39.1 -77.91452,34.04726,-36.9 -77.91453,34.04721,-36.4 -77.91449,34.04717,-34.8 -77.91445,34.04714,-34.2 -77.91442,34.04709,-33.1 -77.91441,34.04704,-33 -77.91439,34.04699,-31.3 -77.9144,34.04694,-31.3 -77.91438,34.04689,-33.8 -77.91436,34.04683,-32.9 -77.91436,34.04677,-31.2 -77.91432,34.04672,-30.2 -77.91429,34.04668,-29.9 -77.91428,34.04663,-29.2 -77.91428,34.04658,-31.4 -77.91425,34.04654,-31.4 -77.91424,34.04649,-32.5 -77.91421,34.04643,-31.9 -77.91418,34.04639,-31.5 -77.91415,34.04634,-31.2 -77.9141,34.0463,-30.9 -77.91404,34.04629,-30.3 -77.91398,34.04631,-31 -77.91391,34.04634,-33.3 -77.91387,34.04637,-34.3 -77.91381,34.04639,-35.2 -77.91375,34.04638,-33.2 -77.91368,34.04637,-32.3 -77.91363,34.04636,-31.9 -77.91358,34.04635,-32.2 -77.91351,34.04635,-32.2 -77.91345,34.04637,-31.4 -77.91338,34.04635,-30.3 -77.91332,34.04634,-31.3 -77.91326,34.04635,-31.9 -77.91321,34.0464,-33.8 -77.91318,34.04644,-33.7 -77.91315,34.04648,-35.5 -77.9131,34.04653,-32.5 -77.91306,34.04656,-33.2 -77.91302,34.04661,-32.8 -77.913,34.04666,-34.5 -77.91297,34.04671,-35.9 -77.91296,34.04676,-34.6 -77.91295,34.04681,-34 -77.91295,34.04687,-36.1 -77.91297,34.04692,-36.5 -77.91298,34.04696,-37.5 -77.913,34.04701,-39 -77.91302,34.04705,-40.1 -77.91304,34.0471,-38 -77.91306,34.04714,-36.5 -77.9131,34.04718,-36.6 -77.91312,34.04723,-35.6 -77.91314,34.04729,-35.2 -77.91313,34.04734,-33.7 -77.9131,34.04738,-32.3 -77.9131,34.04743,-30.7 -77.9131,34.04749,-28.1 -77.91314,34.04754,-26.5 -77.91318,34.04759,-26.5 -77.9132,34.04763,-27.6 -77.91323,34.04768,-29.3 -77.91324,34.04775,-31 1 FF0000E6 4 曲目 0 1 GPS 可视化仪]]> 1 1
I have a bunch of kml files such as this one that I have been trying to insert into my app as a mapview overlay. I understand that I am supposed to parse this file in order to handle it. But I am not sure of the correct way to go about this. Suggestions are greatly appreciated.
clampToGround
-77.91368,34.04805,-42.6 -77.91372,34.04801,-39.8 -77.91374,34.04796,-38.9 -77.91378,34.04792,-37 -77.91382,34.04788,-36.8 -77.91385,34.04783,-33.2 -77.91387,34.04779,-32.9 -77.91392,34.04775,-32.3 -77.91392,34.04769,-33.1 -77.91393,34.04763,-31.9 -77.91392,34.04758,-31.8 -77.91391,34.04752,-33.7 -77.91391,34.04747,-33.9 -77.91394,34.04742,-31.1 -77.91396,34.04737,-29.5 -77.91399,34.04733,-30.3 -77.91404,34.04731,-31.4 -77.9141,34.04731,-31.1 -77.91415,34.04734,-39.5 -77.9142,34.04736,-42.2 -77.91426,34.04736,-43.3 -77.91431,34.04734,-42.6 -77.91436,34.04731,-36.3 -77.91441,34.04728,-38.4 -77.91446,34.04727,-39.1 -77.91452,34.04726,-36.9 -77.91453,34.04721,-36.4 -77.91449,34.04717,-34.8 -77.91445,34.04714,-34.2 -77.91442,34.04709,-33.1 -77.91441,34.04704,-33 -77.91439,34.04699,-31.3 -77.9144,34.04694,-31.3 -77.91438,34.04689,-33.8 -77.91436,34.04683,-32.9 -77.91436,34.04677,-31.2 -77.91432,34.04672,-30.2 -77.91429,34.04668,-29.9 -77.91428,34.04663,-29.2 -77.91428,34.04658,-31.4 -77.91425,34.04654,-31.4 -77.91424,34.04649,-32.5 -77.91421,34.04643,-31.9 -77.91418,34.04639,-31.5 -77.91415,34.04634,-31.2 -77.9141,34.0463,-30.9 -77.91404,34.04629,-30.3 -77.91398,34.04631,-31 -77.91391,34.04634,-33.3 -77.91387,34.04637,-34.3 -77.91381,34.04639,-35.2 -77.91375,34.04638,-33.2 -77.91368,34.04637,-32.3 -77.91363,34.04636,-31.9 -77.91358,34.04635,-32.2 -77.91351,34.04635,-32.2 -77.91345,34.04637,-31.4 -77.91338,34.04635,-30.3 -77.91332,34.04634,-31.3 -77.91326,34.04635,-31.9 -77.91321,34.0464,-33.8 -77.91318,34.04644,-33.7 -77.91315,34.04648,-35.5 -77.9131,34.04653,-32.5 -77.91306,34.04656,-33.2 -77.91302,34.04661,-32.8 -77.913,34.04666,-34.5 -77.91297,34.04671,-35.9 -77.91296,34.04676,-34.6 -77.91295,34.04681,-34 -77.91295,34.04687,-36.1 -77.91297,34.04692,-36.5 -77.91298,34.04696,-37.5 -77.913,34.04701,-39 -77.91302,34.04705,-40.1 -77.91304,34.0471,-38 -77.91306,34.04714,-36.5 -77.9131,34.04718,-36.6 -77.91312,34.04723,-35.6 -77.91314,34.04729,-35.2 -77.91313,34.04734,-33.7 -77.9131,34.04738,-32.3 -77.9131,34.04743,-30.7 -77.9131,34.04749,-28.1 -77.91314,34.04754,-26.5 -77.91318,34.04759,-26.5 -77.9132,34.04763,-27.6 -77.91323,34.04768,-29.3 -77.91324,34.04775,-31
1
FF0000E6
4
Tracks
0
1
GPS Visualizer]]>
1
1
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论