Can I get the exact coordinates of the London zones and use them in code?

I am working with the Google Maps API. I found that the shapes of London's transport and the shapes of London were already drawn. Is it possible to get the exact coordinates, how to do this, and even recreate these shapes using the API?

London Transport Map - https://www.google.com/maps/d/u/0/viewer?mid=1eIjWEQyO-PchgJUttxBBkYqvPxE&ll=51.49280340511744%2C-0.17372399999999288&z=11

Borough https://www.google.co.uk/maps/place/London+Borough+of+Islington

-1


source to share


1 answer


London transport map is "Google MyMap", those if the public can export their data as KML / KMZ and shown on Google Maps Javascript API v3 KmlLayer

enter image description here

snippet of code:



function initialize() {
  var map = new google.maps.Map(document.getElementById("map_canvas"));
  layer = new google.maps.KmlLayer({
    map: map,
    url: "http://www.google.com/maps/d/u/0/kml?mid=1eIjWEQyO-PchgJUttxBBkYqvPxE"
  })

}
google.maps.event.addDomListener(window, "load", initialize);
      

html,
body,
#map_canvas {
  height: 100%;
  width: 100%;
  margin: 0px;
  padding: 0px
}
      

<script src="https://maps.googleapis.com/maps/api/js"></script>
<div id="map_canvas"></div>
      

Run codeHide result


Regarding the Islington city map, which is the "real" Google map, you cannot get this data from Google, you need to find another source.

+1


source







All Articles