1

I have a Google MAPS which is embedded on a web page thanks to Google Maps API v3.

On tablets (and smartphones), when the user wants to "move" the map, then the map is moving which is what I want, but the web page is ALSO moving (scrolling). That is producing a really weird behavior, which makes the map almost unusable.

I mean that if you want to move the map (scrolling with your finger from top to bottom for example), then the map will move (to the top) but ALSO the whole web page will scroll (to the bottom).

I searched a long time and have tried different things, but the problem is still there.

What I have tried :

  • Playing with draggable/scrollWheel but seems that it's not the point (for you information draggable is set to "true" and "scrollWheel" is set to false).
  • Disable "touchstart" and "touchmove" event on the div container (#map) of the Google Maps, but when touching the maps on tablets, it still moves the map AND the web page.

What I want, basically, is that the user can ONLY move the Google Maps when he is touching the Google Maps, not the web page.

Any help will be really appreciated. Thanks a lot..

If this can help, here is the web page : http://www.acheter-neuf-toulouse.com

If you launch the page with a tablet (not a smartphone : the map only appears above a certain width of screen), then you will see that the moving of the map with a finger is totally weird (the page itself is moving)..

Miorita
  • 11
  • 2
  • I am resolve this issue adding a padding to map container, to enable to user scroll the page and not the map. – xzegga Aug 10 '16 at 16:04
  • this answer respond your questions: http://stackoverflow.com/a/2330272/1057007 – xzegga Aug 10 '16 at 16:06
  • 1
    Hi. Thanks a lot for the answer. Unfortunately (I have tried), the question you refer does not help. If _draggable_ is set to false I cannot move the map (the question you refer is about scroll-wheel scaling). I have tried its configuration, without success, I think the issue is elsewhere. I do not understand why the Google Maps AND the Web Page are moving at the same time when using the fingers ("touch") on mobiles. – Miorita Aug 10 '16 at 16:21

0 Answers0