简体   繁体   中英

OpenLayers 3 Rotation example behaves differently in IE/Chrome embedded WebBrowser control on Win32 touch device

I am trying to implement rotation on Open Street Map(OSM) using OpenLayers 3(ol3) in my wpf application using the following example

http://openlayers.org/en/v3.5.0/examples/rotation.html

When I open the above html file using IE/Chrome browser directly, the map rotates absolutely fine when I perform rotation on Win32 touch device(windows 8 tablet), but when I open the same html file in a WebBrowser control in my wpf application the rotation works only when I enable Shift+Alt on my On-Screen keyboard.

I am currently using Internet Explorer 10 and I have also added below tag so that my WebBrowser control also emulates IE 10.

<meta http-equiv="X-UA-Compatible" content="IE=10,chrome=1"> 

I am not able to understant why the rotation functions differently with normal browser and WebBrowser control. Am I missing something??

Please help!!

Finally!!! I got a breakthrough for my issue. The difference in rotation behaviour was the Legacy input Model issue in IE web browser control.

The FEATURE_NINPUT_LEGACYMODE feature control determines whether the legacy input model is enabled. By default, the feature is disabled for Internet Explorer and enabled for applications hosting the WebBrowser Control. To disable this feature by using the registry, add the name of your executable file to the following setting.

HKEY_LOCAL_MACHINE (or HKEY_CURRENT_USER)
   SOFTWARE
      Microsoft
         Internet Explorer
            Main
               FeatureControl
                  FEATURE_NINPUT_LEGACYMODE
                     contoso.exe = (DWORD) 00000000

The feature is enabled when the value is set to (DWORD) 00000001 and disabled when the value is (DWORD) 00000000.

Hence disabling the DWORD value solved my issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM