Created
May 14, 2015 15:15
-
-
Save SirPepe/0012c87226b50806d9b9 to your computer and use it in GitHub Desktop.
Karten-Grab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Benötigt PhantomJS. Benutzung: $ phantomjs grab.js | |
var page = require('webpage').create(); | |
page.viewportSize = { | |
width: 10000, // A0: 9933 | |
height: 15000 // A0: 14043 | |
}; | |
page.open('http://localhost/~peter/map/map.html', function(){ | |
setTimeout(function(){ | |
page.render('map.png'); | |
phantom.exit(); | |
}, 8e+4); // Render-Wartezeit nach Notwendigkeit justieren | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<style> | |
body, html, #wrapper { | |
width: 100%; | |
height: 100%; | |
margin: 0; | |
padding: 0; | |
} | |
</style> | |
<div id="wrapper"> | |
<div id="map"></div> | |
</div> | |
<script src="https://maps.google.com/maps/api/js?sensor=false"></script> | |
<script> | |
window.onload = function(){ | |
var el = document.getElementById('map'); | |
el.style.height = window.innerHeight + 'px'; | |
var map = new google.maps.Map(el, { | |
zoom: 11, | |
center: new google.maps.LatLng(50.75, 11.5), | |
mapTypeId: google.maps.MapTypeId.ROADMAP | |
}); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment