本文介绍了通过Maps API v3样式使用Google的“我的地点”地图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用通过Google Maps API v3创建的自定义样式,并通过我在线上的我的位置工具创建的外部地图,而无需下载KML数据。

>这是一个链接到我的地图与KML数据:





我看到了一个解决此问题的前一个问题:



此链接将生成包含任何更改的KML,因此,如果您从这里读取KML您的更改将在客户使用此数据时显示。我在想,直接点击网址并不违反不下载KML的含义,我正确吗?


I am trying to use my custom styling created through Google Maps API v3 with an existant map I created through the My Places tool online, without downloading the KML data.

Here is a link to my map with the KML data:

https://maps.google.co.uk/maps/ms?msid=214652605574280498452.0004d3cc7c556a8346d32&msa=0

I saw a previous question which addressed this issue:

Query existing, public Google Map via the Google Maps API v3

However, rather than downloading the KML data, is there a way to use my map directly? I need to later make changes to the place markers without having to download the KML each time.

解决方案

When you create the map in MyPlaces the link to your KML document is a unique URL which you could load using the API, in your case the URL above with the output=kml variable added to the URL: https://maps.google.co.uk/maps/ms?ie=UTF8&msa=0&output=kml&msid=214652605574280498452.0004d3cc7c556a8346d32

This link will generate KML with any changes included, so if you read your KML from here every time your changes will be displayed when a client makes use of this data. I am thinking that hitting the URL directly is not violating what you mean by "not downloading the KML", am I correct?

这篇关于通过Maps API v3样式使用Google的“我的地点”地图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-01 17:10