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
source to share
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
- Go to the map
- click on the three vertical dots
- click "Download KML"
- Select "Keep data up to date with a network link (for web use only)".
- unzip this file and pull the link from it (this is a zip file containing a KML file called doc.kml): http://www.google.com/maps/d/u/0/kml?mid=1eIjWEQyO-PchgJUttxBBkYqvPxE
- use this as a KML layer url ( proof of concept scripting )
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>
Regarding the Islington city map, which is the "real" Google map, you cannot get this data from Google, you need to find another source.
source to share