Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • Andrzej Wachałowicz Friend
    #203439

    Hi there,

    How disable scrollwheel in Ja Google Map?

    I want the map to move on right or left or up or down, but I need to disable zooming with mouse scrolling.

    I know that to fix it google requires “scrollwheel: false” in map options, but I really don’t know how to set up this on Ja Google Map Plugin.

    The problem is on my following sites: http://swietarodzina.pl/ or http://edukus.pl/ or http://new.powolania.pl/.

    Please help me in this, people.

    dingallina Friend
    #558070

    Hi Andrzejw…
    if you always want this behavior I think you can simply modify file “libraries/joomla/google/embed/maps.php” around line 560 like this:
    [PHP]
    $setup = ‘var mapOptions = {‘;
    //Add the line below
    $setup .= “scrollwheel: false,”;
    //End line added
    $setup .= “zoom: {$zoom},”;
    [/PHP]

    Hope this helps,
    Diego.

    Andrzej Wachałowicz Friend
    #558071

    Unfortunetely it doesn’t help at all. Nothing is changed :((

    dingallina Friend
    #558083

    Oh… I’m sorry man… Probably I was sleeping.
    You’re talking about JaGoogleMap… So the right modify is on the file “plugins/system/jagooglemap/assets/script.js” at line 41 (may be different), after the line var mapOptions = {};

    This is the code that works (tested on my quickstart)


    createElement: function(){
    var mapOptions = {};
    //Add the line below
    mapOptions.scrollwheel = false;
    //Stop editing
    mapOptions.mapTypeId = this.getMapType(this.options.maptype);

    Sorry for the first answer!

    Bye,
    Diego.

    Andrzej Wachałowicz Friend
    #558084

    WOW, thanks a lot !

    Your solution is amazing.

Viewing 5 posts - 1 through 5 (of 5 total)

This topic contains 5 replies, has 2 voices, and was last updated by  Andrzej Wachałowicz 9 years, 11 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum