Good morning everyone!
I'm trying to show a .json layer on Google Maps. This is the example that I'm using.... got it from google.
<!DOCTYPE html>
<html>
<head>
<title>Data Layer: Simple</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<style>
html, body, #map-canvas {
height: 100%;
margin: 0px;
padding: 0px
}
</style>
<script src="http://ift.tt/1orrD4c"></script>
<script>
var map;
function initialize() {
// Create a simple map.
map = new google.maps.Map(document.getElementById('map-canvas'), {
zoom: 8,
center: {lat: -49.08854215606961, lng: -26.499852240464975}
});
// Load a GeoJSON from the same server as our demo.
map.data.loadGeoJson('http://ift.tt/1HKtjPq');
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
</head>
<body>
<div id="map-canvas"></div>
</body>
</html>
I don't know if it's a problem with the json file itself or with the html code. Could someone help me with this? Thanks!
Aucun commentaire:
Enregistrer un commentaire