nextzen / d3-vector-tiles

Adapting d3.geo.tile to show Mapzen vector tiles
http://nextzen.github.io/d3-vector-tiles
MIT License
52 stars 21 forks source link

iOS 10 causes window to shift when panning map #27

Open elwin-jacellc opened 7 years ago

elwin-jacellc commented 7 years ago

After upgrade to iOS 10, whole window now shifts when panning with touch interface. Same effect in Mobile Safari and Chrome.

elwin-jacellc commented 7 years ago

Here's a fix:

$("#map").bind("touchmove", function(){
    $('body').bind('touchmove', function(e){e.preventDefault()});
});
$("#map").bind("touchend", function(){
    $('body').unbind('touchmove');
});