I created kml file from ArcMap and imported into my Google maps, it works. Not sure if you can open this URL:
https://www.google.com/maps/d/edit?mid=13TuHmGuW9nnE-8TACTfGLdDDf6o&ll=38.90133009121122%2C-77.01476049999996&z=12
Now I want to display my map using Java API and I used this code
https://developers.google.com/maps/documentation/javascript/kml
tweaked it a little bit, inserted my API_Key at the end of the script but the problem is
<script>
var map;
var src = 'https://myGoogleMapURL
should be with the .kml extension if I am not mistaken.
My question is, how do I generate kml file/url from my map URL mentioned above.
I tried adding &output=kml
at the end of the Google map URL as some people suggested but it does not work.
Best Answer
You can download the data directly from MyMaps with this syntax
The
MAP_ID
is the ID in the URL when you've got the MyMap open,eg. your map
will be...
or adding to your Google Maps Javascript API. But there is a limit of 2mb data size for this.
Take note of your sharing settings. This does expose your data publicly (If they have the link or even the ID) but that's whats needed to download the data directly