Prevent maps from being draggable on iphone

This topic contains 16 replies, has 4 voices, and was last updated by  jack3 9 years ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #29654

    viguursthijs
    Buyer
    Post count: 273

    Hi all,

    We try to prevent the map on the homescreen from hijacking ipad an smartphone-users.

    Google advices to set the option draggable on False, but we cant find the right spot in de code or database to change this.

    -Does anyone have a solution to solve this?

    Thanks in advance!

    #29656

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi, u kinda need them to be dragable or they will be useless…? What exactly is the problem?

    Stiofan

    #29660

    viguursthijs
    Buyer
    Post count: 273

    Hi Stiofan,
    Try to visit http://www.iamyogi.nl with a mobile device. You’ll experience that its very annoying for a user to scroll to the bottom of the page, because you naturally place your thumb ON the map. So instead of scrolling a page, you scroll the map.

    We understand that we have to make a difference for mobile vs computer-visitors, but given the fact that almost half of the dutch internetusage is being generated from mobile devices we have to change this.
    But the relevant code for it seems invissible;-) any advice on the correct file?

    Thanks again

    #29665

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    OK, there are several solutions, if you have the latest GD then u can go into the map widget settings and set the height to “50vh” this will set the height of the map to 50% of the visual height of the browser window, this will mean users can use the map and also scroll past it (u can set the height to “70vh” being 70% of the height, etc…)

    You could also hide the map with CSS for mobile but i don’t know of a solution for making it basically “broken” for mobile where it does not scroll..

    Thanks,

    Stiofan

    #29670

    viguursthijs
    Buyer
    Post count: 273

    Hi Stiofan,

    Thanks!
    our developer wants to try something out in a separate development-environment, but he cannot find the right spot for the relevant files. Can you tell where we can find it?

    #29678

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Did u try my solution?

    Files for what?

    #29693

    viguursthijs
    Buyer
    Post count: 273

    Well, we prefer to let users be dumb, so creating an area where they can scroll is not really nice, because it creates human errors and thus irritations…

    We are looking for the specific file where the behaviour of the google-maps is managed. There should be one, but we cannot find it. Am i clear enough, or too vague?

    #29703

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Yes still to vague, what setting in google maps are u trying to change?

    Stiofan

    #29785

    viguursthijs
    Buyer
    Post count: 273

    Hi Stiofan,

    this is what we have found:
    https://developers.google.com/maps/documentation/javascript/reference

    If you look at it, somewhere in the end (in a table called PROPERTIES) you see that Google offers a way to prevent the map from being dragged. We think that this would be by far the best way to prevent users on smartphones (AND ipads) to get insane.

    Our theory is that somewhere in a wp-geodirectory-related file we should add some lines of code to try whether it really works as we like.
    But: where? Which file is related to the behavior of the google map on the homepage?
    We searched and searched, with no happy ending yet, and we hope that it’s just a simple question…

    #29788

    Paolo
    Site Admin
    Post count: 31206

    The map in home page is a widget and can be found in :

    geodirectory-widgets/home_map_widget.php

    Starting from there your developer can recreate a new widget (possibly in a child theme) that behaves exactly as you wish.

    Thanks

    #29801

    viguursthijs
    Buyer
    Post count: 273

    Thanks we will try it!

    #29976

    viguursthijs
    Buyer
    Post count: 273
    This reply has been marked as private.
    #29979

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    ok thanks for the suggestion, i have added this to our PM and it will be looked at when we are optimising maps, but there is no set date for when this will happen yet.

    Thanks,

    Stiofan

    #30574

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    This has been added to core and will be in the next ver.

    Thanks,

    Stiofan

    #30592

    viguursthijs
    Buyer
    Post count: 273

    Super!!!

Viewing 15 posts - 1 through 15 (of 17 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket