Skip to content

Instantly share code, notes, and snippets.

@mxstbr mxstbr/grab.js forked from SirPepe/grab.js
Last active Aug 29, 2015

Embed
What would you like to do?
// 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
});
<!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
You can’t perform that action at this time.