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?
来源:https://stackoverflow.com/questions/14442560/using-an-existant-google-my-places-map-with-maps-api-v3-styling