简体   繁体   English

如何使用javascript将KML文件与Google Maps API集成?

[英]How to integrate KML file with Google Maps API using javascript?

I've used Google Maps API in the past and published a KML file using html. 我过去使用过Google Maps API,并使用html发布了KML文件。

However, I've been learning about customizing Google Maps using javascript (I'm new to JS - total beginner) using this tutorial: https://code.tutsplus.com/courses/custom-interactive-maps-with-the-google-maps-api 但是,我一直在学习使用Javascript使用JavaScript(我是JS的新手-初学者)自定义Google Maps: https : //code.tutsplus.com/courses/custom-interactive-maps-with-the-谷歌,地图的API

What I'm wondering is if anyone can explain how to incorporate the KML file into a customized map using the approach described in the tutorial. 我想知道的是,是否有人可以解释如何使用本教程中介绍的方法将KML文件合并到自定义地图中。 The source files are accessible here: https://github.com/tutsplus/google-maps-api 可在以下位置访问源文件: https : //github.com/tutsplus/google-maps-api

Thanks in advance for your help. 在此先感谢您的帮助。

There is a tutorial for KML layers in the official documentation. 官方文档中提供了有关KML图层的教程。 Take a look at the 看看

https://developers.google.com/maps/documentation/javascript/kml https://developers.google.com/maps/documentation/javascript/kml

Hope this helps! 希望这可以帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM