通过Maps API v3样式使用Google的“我的地点”地图 [英] Using an existant Google 'My Places' map with Maps API v3 styling

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

问题描述

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

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



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



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



但是,不是下载KML数据,而是直接使用我的地图吗?我需要稍后对地点标记进行更改,而无需每次下载KML。 解决方案

MyPlaces指向您的KML文档的链接是一个可以使用API​​加载的唯一网址,在您的情况下,上面的网址将output = kml变量添加到网址中: https://maps.google.co.uk/maps/ms?ie=UTF8& msa = 0& output = kml& msid = 214652605574280498452.0004d3cc7c556a8346d32



此链接将生成包含任何更改的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的“我的地点”地图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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