{"id":1490,"date":"2008-10-18T16:55:15","date_gmt":"2008-10-18T21:55:15","guid":{"rendered":"http:\/\/blogs.terrorware.com\/geoff\/2008\/10\/18\/getting-list-of-places-on-a-map-created-with-google-mymaps\/"},"modified":"2008-10-18T17:43:34","modified_gmt":"2008-10-18T22:43:34","slug":"getting-list-of-places-on-a-map-created-with-google-mymaps","status":"publish","type":"post","link":"http:\/\/blogs.terrorware.com\/geoff\/2008\/10\/18\/getting-list-of-places-on-a-map-created-with-google-mymaps\/","title":{"rendered":"Getting list of places on a map created with Google MyMaps"},"content":{"rendered":"<p>So I made a map using Google MyMaps of venues for events in Bloomington.\u00c2\u00a0 Crystal added a ton of content and made it look pretty.\u00c2\u00a0 The hard part is figuring out how to provide a listing of event locations with the map.\u00c2\u00a0 You can get the map data for the map that you created in MyMaps as KML or GeoRSS.\u00c2\u00a0 Then you can load it and parse it using part of the Google Maps API a la this code snippet I found at http:\/\/www.easypagez.com\/maps\/phpsqlinfo.html:<\/p>\n<blockquote>\n<pre> \/\/ Read the data from example.xml\t function readData() {      var request = GXmlHttp.create();      request.open(\"GET\", \"http:\/\/www.easypagez.com\/maps\/phpsqlinfo_result.php\", true);      request.onreadystatechange = function() {        if (request.readyState == 4) {          var xmlDoc = GXml.parse(request.responseText);          \/\/ obtain the array of markers and loop through it\t\t  \t  i=[0];\t\t\t  markers=[0];\t\t\t  map.getInfoWindow().hide();\t\t\t  gmarkers = [];\t\t\t  map.clearOverlays();\t\t\t  side_bar_html = \"\";          var markers = xmlDoc.documentElement.getElementsByTagName(\"marker\");          for (var i = 0; i &lt; markers.length; i++) {            \/\/ obtain the attribues of each marker            var lat = parseFloat(markers[i].getAttribute(\"lat\"));            var lng = parseFloat(markers[i].getAttribute(\"lng\"));            var point = new GLatLng(lat,lng);            var label = markers[i].getAttribute(\"name\");\t\t\tvar address = markers[i].getAttribute(\"address\");\t\t\tvar type = markers[i].getAttribute(\"type\");\t\t\tvar html = label + '&lt;br \/&gt;' + address + '&lt;br \/&gt;' + type;            \/\/ create the marker            var marker = createMarker(point,label,html);            map.addOverlay(marker);          }          \/\/ put the assembled side_bar_html contents into the side_bar div          document.getElementById(\"side_bar2\").innerHTML = side_bar_html;        }      }      request.send(null);\t}\treadData();  }<\/pre>\n<\/blockquote>\n<p>You can also\u00c2\u00a0<a href=\"http:\/\/googlemapsapi.blogspot.com\/2007\/03\/kml-and-georss-support-added-to-google.html\">load KML and display it on a map you create using the Maps API<\/a>.\u00c2\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So I made a map using Google MyMaps of venues for events in Bloomington.\u00c2\u00a0 Crystal added a ton of content and made it look pretty.\u00c2\u00a0 The hard part is figuring out how to provide a listing of event locations with the map.\u00c2\u00a0 You can get the map data for the map that you created in&hellip; <a class=\"more-link\" href=\"http:\/\/blogs.terrorware.com\/geoff\/2008\/10\/18\/getting-list-of-places-on-a-map-created-with-google-mymaps\/\">Continue reading <span class=\"screen-reader-text\">Getting list of places on a map created with Google MyMaps<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-1490","post","type-post","status-publish","format-standard","hentry","category-uncategorized","entry"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4wnIz-o2","_links":{"self":[{"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/posts\/1490","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/comments?post=1490"}],"version-history":[{"count":0,"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/posts\/1490\/revisions"}],"wp:attachment":[{"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/media?parent=1490"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/categories?post=1490"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/tags?post=1490"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}