Search code examples
javascripttouchmapbox

MapBox scroll page on touch


I'm trying to implement MapBox on a layout which fills 100% of the page. I've disable the map zoom options but the problems comes when trying to scroll on touch devices where the map fills the viewport. Can I override this or have the browser treat it like an image?


Solution

  • This example has been improved: the line that was missing is:

    if (map.tap) map.tap.disable();

    This will prevent the map from killing tap events on touch devices.