Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using an existant Google 'My Places' map with Maps API v3 styling

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.

like image 823
Alex Avatar asked Jan 21 '13 16:01

Alex


People also ask

Can you style Google Maps API?

Google Maps Platform offers Cloud-based maps styling features that make it easy to style, customize, and manage your maps using the Google Cloud Console, letting you create a customized map experience for your users without having to update your apps' code each time you make a style change.


1 Answers

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?

like image 70
Matthew Avatar answered Oct 12 '22 12:10

Matthew