Skip to content

Instantly share code, notes, and snippets.

Created November 16, 2016 22:00
Show Gist options
  • Save anonymous/c3229a4a6dce59e8547f366a5fcb77b3 to your computer and use it in GitHub Desktop.
Save anonymous/c3229a4a6dce59e8547f366a5fcb77b3 to your computer and use it in GitHub Desktop.
fresh block
license: mit
<!DOCTYPE html>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"/>
<style>
html, body, #map {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
.stations, .stations svg {
position: absolute;
}
.stations svg {
width: 60px;
height: 20px;
padding-right: 100px;
font: 10px sans-serif;
}
.stations circle {
fill: brown;
stroke: black;
stroke-width: 1.5px;
}
</style>
<div id="map"></div>
<script src="//maps.google.com/maps/api/js?sensor=true"></script>
<script src="//d3js.org/d3.v3.min.js"></script>
<script>
// Create the Google Map…
var map = new google.maps.Map(d3.select("#map").node(), {
zoom: 6,
center: new google.maps.LatLng(-37, -62),
mapTypeId: google.maps.MapTypeId.SATELLITE
});
//Load in GeoJSON data
map.data.loadGeoJson('provincia.geojson');
// Set the stroke width, and fill color for each polygon
map.data.setStyle({
fillColor: 'yellow',
strokeWeight: 1
});
</script>
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment