|     Documentation    |     Premium Support

Problem with Touch Screen when map changes size + Disabling pan

Me and my colleagues are having a problem with controlling the map UI on a Windows 10 touch screen tablet.
The main issue only starts to happen once touch is detected (we have both the touch screen and mouse connected to the tabled). Initially the mouse interactions work fine until the map is touched using the touch screen; after that when we resize the map in any way (either using built in methods in code or simply making the application window small) both mouse and touch stop working consistently.

Steps to replicate the problem:

1) Touch the map using the touch screen.
(at this point the interactions should still be working fine)
2) Resize the map in any way (either using the code or simply make the application window smaller)
(at this point the interactions should become inconsistent)
3) try panning using touch (it should not work consistently)

Try resizing the window in different ways. Sometimes when resized few times the functionalities would come back, and sometimes they would disappear for good.

(Now the Disabling pan problem)
After experiencing this problem we tried to solve it by disabling the original pan using " Map.ExtentOverlay.PanMode = MapPanMode.Disabled; ". This however only disabled panning using the mouse, the touch screen still allowed pan therefore our methods resulted in double movements (we used the Pan method giving a change vector)

Is there any way to solve these problems?

Hey @Daniel_Williams,

I’m in the process of getting a hold of a touchscreen to test this issue out. Unfortunately, that might take a couple days. In the meantime, I’d like to gather some additional information:

  1. What version of the ThinkGeo WPF Nuget packages are you using in your application?
  2. In Step 3, you say that it won’t work consistently. Is it only after multiple window resizes that the functionality returns? Or can you get functionality back with additional touch/mouse events?
  3. Were you doing some additional custom panning logic when you disabled the PanMode for the mouse? You mentioned you were getting double movement input, so I’m not sure here


Hello @Kyle_Day,
Thank you for the quick response!
We have a windows 10 tablet that we tested this on, however we often test out touch screen capability on the desktop using a built in VisualStudio tool that allows to simulate touching the screen. This tool is a good replacement if you dont have a touch screen windows 10 tablet, and it still would allow you to simulate the problem from a desktop. If you would like here are the steps to get it:

1) Make sure UWP development tools are installed in Visual Studio. To install them in Visual Studio click Tools->Get Tools and Features and choose Universal Windows Platform development. Admin rights are required to install it.

2) Create a shortcut with a Target of:
C:\Windows\System32\runas.exe /user: “C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Simulator\16.0\Microsoft.Windows.Simulator.exe”

3) When you run the shortcut you will be asked for your PC password.

when its on you can turn on the build through the window that pops up and use the menu on the right side to select touching (pointing hand icon)

Here is the information you asked for :slight_smile:

  1. The versions I am using are:
    ThinkGeo.UI.Wpf version 12.3.2
    ThinkGeo.MapSuite.ProductCenter version 10.6.6
    ThinkGeo.Dependency.WriteableBitmapEX version 12.2.1
    ThinkGeo.Dependency.SQLite version 12.2.1
    ThinkGeo.Dependency.SkiaSharp version 12.3.0
    ThinkGeo.Dependency.NetTopologySuite version 12.2.1
    ThinkGeo.Dependency.Jint version 12.2.1
    ThinkGeo.Core version 12.3.2

  2. Normally the functionality is fine until the first resize (after the screen was touched). After that the panning and zooming with both touch and mouse stopped working even after I resized the window to its original size; any further resizes did not fix the panning and zooming.

After doing some experimenting I noticed that sometimes when resized and the functionality is gone, the touch (but not mouse) panning and zooming works only in the top left quarter of the map display (When the map is large enough if its too small panning and zooming doesn’t work anywhere), after I touched the top left quarter the panning started working on the whole display again (until the map was resized again, then it stopped working). The whole functionality never comes back by just resizing the map again.

Here are screenshots of one example:

Original size that map (Panning and zooming is working fine)

Touched the map and resized the window to make the map display smaller, at this point the touch map does not work anymore on the entire map

After this I have resized the map back to full screen and both pan and zoom continued to not work for most of the map display (except the top left quarter of the map display) Once I have done something on the top left quarter the whole map panning and zooming functionality came back.

Further resizes have again made panning and zooming stop working.

Similarly to this our program has a collapse button (on the right of the map display above) that collapses the tables on the right and makes the map full screen. However using this gives the same effect as simply resizing the application window.

I noticed that when the map was small enough the full functionality disappeared, but when the map was larger the “top left quarter” method worked.

  1. Before me and my colleagues noticed the issue we have not implemented any other panning logic. Once we spotted the issue we made few simple Map.TouchMove and Map.MouseMove events that manually calculated panning; we hoped we could avoid the issue by making our own panning and disabling the built in methods using PanMode.Disabled. Unfortunately because the the PanMode.Disabled did not turn off panning using touch both our method of panning and the built in method was running (at least until we resized the window and the built in touch panning stopped working due to the problem, then only our method was panning the map and it worked fine untill sometimes something was done in the top left corner of the map display, and the original touch pan functionality came back) because the built in pan was panning the map normally, and our method was manually panning the map by the difference vector ( we used Map.Pan(diffX, diffY); ) the map was panning double the distance it should have.

Thank you for your help!
if you have any more questions feel free to ask, im happy to help in any way to solve this problem!

Hey @Daniel_Williams,

Thanks for the pointer on WindowsSimulator. I managed to get it running and I created a sample and was able to recreate the issue. I also updated the Nuget packages to the latest 12.4.1 release and found that touch controls actually gets worse and won’t work at all!

It might take me some time to figure out what exactly is going on, but in the meantime, I would get prepared to update to the latest release version of 12.4.1 on your application since we’ll need to push out an update for this. I don’t suspect any major changes in this version for you, just the aforementioned touch controls not working.

I’ll update you when I discover more information on this issue.


Alright thank you very much!

Hello @Kyle_Day!
Is there any update when it comes to this problem?

Hey @Daniel_Williams,

Sorry for the delay on this. I’ve been a bit stacked. So, as it turns out, we made some backend changes to our control a while back that basically broke all touch controls. In order to restore all of that, we’ll need to adapt the touch code to work with the backend changes.

That might take a little while to fix, so I’ve added a bug report in our issue tracker to restore this functionality in a future release. Until then, however, I can’t recommend you upgrading to the latest version. I can notify you once the fix is in the beta packages for you to try out.


Ok thank you for the update!
Meanwhile is there any way to disable current panning for touch? as Map.ExtentOverlay.PanMode = PanMode.Disabled only disables mouse pan. Also is there any way to implement zooming at a specific point? as zooming stops working together with panning and I was thinking of adding manual panning/zooming.
Thanks alot.

Hey @Daniel_Williams,

If you update to v12.4.1, all touch should not be working at all in that version. And for manual controls for pan/zoom, you can either use the PanZoomBar, or create your own controls for that. For instance, in our Basic Navigation sample, we setup zooming, panning and rotating the map as separate controls:



HI Daniel,

I happened to see this post and not sure if you are still interested in touch screen. We have been greatly improved the touch screen support the latest WPF. Here is a sample, as well as a video about it;