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:

  1. before state: map bounces on every touch, no pan possible
  2. 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

[3] https://github.com/openlayers/ol2/issues/1290

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:

[1] how dynamically create css class in javascript , apply?


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -