Josh3736's answer helps me, thanks for that. I would like to expand it with my solution:
The first thing I did was I added the #overlay div mentioned by josh3736.
Then I implemented a bit of jQuery Script to determine if the user was doing something or in standby mode:
// jQuery Idle idleTimer = null; idleState = false; idleWait = 2000; (function ($) { $(document).ready(function () { $('*').bind('mousemove keydown scroll', function () { clearTimeout(idleTimer); if (idleState == true) { // Reactivated event $('html').removeClass('idle'); $('html').addClass('no-idle'); } idleState = false; idleTimer = setTimeout(function () { // Idle Event $('html').addClass('idle'); $('html').removeClass('no-idle'); idleState = true; }, idleWait); }); $("body").trigger("mousemove"); }); }) (jQuery)
As you can see, Script adds classes to html: idle and no-idle.
After that, I added the following CSS-Snipet:
#map-overlay { display: none; position: absolute; z-index: 500; } .idle #map-overlay { display: block; }
So, as you can see, the idea is that the user can use the map function as soon as he is no longer idle. And due to the fact that the idle starts after scrolling, it works like a charm with touch devices.
Hope this helps.
lufi
source share