javascript - OpenLayers-2.13.1 + Cordova not panning well in WP10 or WP8.1 -
i have used
html {     -ms-touch-action: none;     touch-action: none; }   in styles and
 this.cordovaview.disablebouncyscrolling = true;   on .cs file of cordova mainpage.xaml.cs file.
with these fixes can advance much:
- before state: map bounces on every touch, no pan possible
 - after state: no bounce anymore, pan freezes in 1 minute of usage.
 
how map functioning pan events map not freeze, stop working after swipes there , here? why map "remembers" touch event outside map , zoom happens 1 finger only.
my sources:
[1] https://github.com/vilic/cordova-plugin-fix-wp-bouncing
[2] prevent scrolling out of cordovaview in cordova windows phone 8
catcha!
i limited screen size map fit in 1 screen without scroll , style thing mentioned in question making bounce go away.
i limited style page dynamically adding class html , limiting fix class:
js
    function applyclass(name,element,doremove){         if(typeof element.valueof() == "string"){             element = $wnd.document.getelementsbytagname(element)[0];         }         if(!element) return;         if(doremove){             element.classname = element.classname.replace(new regexp("\\b" + '\\s' + name + '\\s' + "\\b","g"), "");         }else{                   element.classname = element.classname + " " + name;         }     }     applyclass('scrollfix', 'html', false);    css
html.scrollfix {     -ms-touch-action: none;     touch-action: none; }   source of fix:
Comments
Post a Comment