Your script does a better job of making them obvious.
The layer from Waze only has little indicators.
The layer from Waze only has little indicators.
There may be a cross-domain security issue -- with Toolbox, we can't get the inset livemap to show on beta, either.pvo11 wrote:I don't have access to the beta with my login. In the Practice mode is the layer visible but there is nothing visible in the layer.AlanOfTheBerg wrote: Only L5+ can see the Road Closures layer. Currently, the layers look like this with Road Closures being default set to Shift+c as the shortcut:
Code: Select all
(function() {
//...
})();
Code: Select all
function liveMapClosures_bootstrap()
{
if (typeof Waze === 'undefined' || typeof Waze.map === 'undefined') {
setTimeout(liveMapClosures_bootstrap, 500);
console.log('Waze object unavailable, map still loading');
} else {
liveMapClosures_init();
}
}
I've just tested this and it seems you are right. I assumed these functions would be exposed as the code recommendations mentioned prefixing your function names with something script-specific, but that seems to be based on the old and non-sandbox working of GreaseMonkey and therefore no longer relevant indeed.pvo11 wrote:Wrapping script to an anonymous function is not necessary because this will be done by GM and the functions are not visible outside the script.
I'm aware of that page and have already proposed changes to it quite a while ago. I've now updated that proposal to take into account the sandboxing of variables and functions.pvo11 wrote:For the bootstrapping use the code recommended here:
https://wiki.waze.com/wiki/Scripts/WME_ ... otstraping
Re: [Script] WME Road Closures