Last active
March 12, 2023 18:59
-
-
Save Arty2/dda65188e97e16af8a19 to your computer and use it in GitHub Desktop.
A technique to capture large screenshots from http://gis.ktimanet.gr/
This file contains hidden or 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
/* | |
Instructions for Firefox: | |
1. On Firefox, open http://gis.ktimanet.gr/wms/ktbasemap/default.aspx and zoom to your area of interest | |
2. Hit Shift + F4 to open the Scratchpad and paste the code below, then click on “Run” (Ctrl + R). | |
You may close the Scratchpad. There’s no need to save anything. | |
3. Input your desired image size on the prompt window (height equals width) | |
4. Refine your position, eg: zoom with the scrollbar or pad by click and drag | |
5. Capture a screenshot of the full page with Firefox’s built-in tools: https://screenshots.firefox.com/ | |
Also works in Chrome but there’s no built-in way to capture the screenshot. | |
In Chrome, hit Ctrl + Shift + I and paste the code in the Console. | |
*/ | |
var size = parseInt(prompt('Enter window size (width equals height):',2000)); | |
document.getElementById('DivLogos').style.display = 'none'; | |
document.getElementById('HelpPage').style.display = 'none'; | |
document.getElementById('KT.KTWebMap.0.ToolBar').style.display = 'none'; | |
document.getElementById('KT.KTWebMap.0.KtimMapLogo').style.display = 'none'; | |
document.getElementById('KT.KTWebMap.0.InfoDiv').style.display = 'none'; | |
// delete the following line to enable map labels and streets | |
document.getElementById('KT.KTWebMap.0.InfoDrawingCanvas').style.display = 'none'; | |
//delete the following line to enable the Points of Interest layer | |
document.getElementById('KT.KTWebMap.0.InfoVectorLayerDiv').style.display = 'none'; | |
document.getElementById('Canvas').style.top = '0'; | |
document.getElementById('Canvas').style.border = '0'; | |
document.getElementById('Canvas').style.marginBottom = '-300px'; | |
document.getElementById('Canvas').style.width = size + 'px'; | |
document.getElementById('Canvas').style.height = size + 'px'; | |
window.scrollTo( ( size/2 - window.innerWidth/2 ), ( size/2 + window.innerHeight/2 )); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment