The only way to do that at the moment is by adding code like this the wpsl-gmap.js file just below the myOptions var.
if ( checkMobileUserAgent() ) {
myOptions.draggable = false;
}
Not sure if this is a very user friendly thing to disable on a mobile device? But maybe I will make this an option in a future update, so that you can enable it from the settings page.
i patched it for the time being by adding this:
var mobileMapOptions = {
draggable: false,
scrollwheel: false
}
var desktopMapOptions = {
draggable: true,
scrollwheel: true
}
var minDraggableWidth = 769;
google.maps.event.addDomListener(window, "resize", function() {
if (document.body.clientWidth < minDraggableWidth) {
map.setOptions(mobileMapOptions);
} else{
map.setOptions(desktopMapOptions);
}
});
I don’t really like this solution, as it gets lost after each plugin update..
Is there a repository i can contribute to? I’d add the necessary changes if you like.
The whole reason behind this is, that users on mobile devices will only scroll the map and not the site when reaching the storefinder. The only way (i’m aware) to prevent this is to set draggable to false.
Thank’s for the support and the plugin either way 😉