[Script] WMEOpenData v3.31 (20240203)
(Split from thread formerly known as OS Open Data mistakes)
The latest version (see thread title) can be dowloaded from https://greasyfork.org/en/scripts/1941-wme-opendata
It's my first GM script, so it's almost certain to contain at least one show-stopping bug that'll prevent it from running on any system other than mine I also haven't bothered seeing if it's possible to capture the window resize event to automatically reset the map view dimensions when the browser window is resized, but a manual refresh of the page does the job almost as well.
What it does do (assuming it's working as expected - see previous disclaimer!), is remove everything outside of the map rectangle other than the boundary layers menu, and then resize everything so that it just fits within the available browser window area without requiring scroll bars. Which is nice. Originally tested using Firefox+Greasemonkey, it also appears to work OK in Chrome using its native support for GM scripts. Even nicer.
Note: this is a manually recreated copy of the original opening post which, thanks to a stupid bug in the forum software which still hasn't been fixed, prevents messages imported from the older forum from being edited if they contain certain character sequences - this inability to edit the opening post at all meant I wasn't previously able to update the version/release date in the thread title, so it looked like I'd abandoned development...
I too was getting a bit frustrated at the small map window offered by the OS site, so I had a quick play around with greasemonkey and came up with the following:Dave2084 wrote: I'm using the OS data more and more, definitely the best resource out there.
I'd there a better viewer than the OS one? I'd like to use more of the screen!
Code: Select all
// ==UserScript==
// @name OS OpenData FullHeight
// @namespace http://greasemonkey.chizzum.com
// @description Increases height of map window on OS OpenData site
// @include http://www.ordnancesurvey.co.uk/oswebsite/opendata/viewer/*
// ==/UserScript==
var elmDeleted = document.getElementById("sitefooter");
elmDeleted.parentNode.removeChild(elmDeleted);
var elmDeleted = document.getElementById("logos");
elmDeleted.parentNode.removeChild(elmDeleted);
var elmModify = document.getElementById("wrapper");
elmModify.style.padding = '4px';
var elmModify = document.getElementById("mapmast");
elmModify.style.height = '16px';
var elmModify = document.getElementById("map");
elmModify.style.height = (window.innerHeight-30)+'px';
The latest version (see thread title) can be dowloaded from https://greasyfork.org/en/scripts/1941-wme-opendata
It's my first GM script, so it's almost certain to contain at least one show-stopping bug that'll prevent it from running on any system other than mine I also haven't bothered seeing if it's possible to capture the window resize event to automatically reset the map view dimensions when the browser window is resized, but a manual refresh of the page does the job almost as well.
What it does do (assuming it's working as expected - see previous disclaimer!), is remove everything outside of the map rectangle other than the boundary layers menu, and then resize everything so that it just fits within the available browser window area without requiring scroll bars. Which is nice. Originally tested using Firefox+Greasemonkey, it also appears to work OK in Chrome using its native support for GM scripts. Even nicer.
Note: this is a manually recreated copy of the original opening post which, thanks to a stupid bug in the forum software which still hasn't been fixed, prevents messages imported from the older forum from being edited if they contain certain character sequences - this inability to edit the opening post at all meant I wasn't previously able to update the version/release date in the thread title, so it looked like I'd abandoned development...
Re: [Script] WMEOpenData v2.50 (20190823)