PHP Classes

Scroll wheel zoom

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in

      Easy Google Map  >  All threads  >  Scroll wheel zoom  >  (Un) Subscribe thread alerts  
Subject:Scroll wheel zoom
Summary:sorry for the spanish, but i think the code speaks for itself
Author:Martín Coll
Date:2010-04-25 20:42:16

  1. Scroll wheel zoom   Reply   Report abuse  
Picture of Martín Coll Martín Coll - 2010-04-25 20:42:16
acabo de modificar el script para poder usar zoom con la rueda del mouse. Simplemente hay que agregar una nueva variable: (NEW VAR:)

* @desc: booleanEnable/Disable Scroll Wheel Zooming
* @type: boolean
* @access: public

var $mScrollWheelZoom = FALSE;"

y luego agregar una línea de codigo donde empieza el script: (ADD CODE:)

" # start of JS SCRIPT
$ret .= "<script type=\"text/javascript\">\n";
$ret .= "var gmarkers = [];\n";
$ret .= "var address = [];\n";
$ret .= "var points = [];\n";

$ret .= "if(GBrowserIsCompatible()) { \n";
$ret .= " var map = new GMap2(document.getElementById('map')); \n";

# handle map continuous zooming
$ret .= ($this->mContinuousZoom==TRUE)?" map.enableContinuousZoom(); \n":"";

# handle map double click zooming
$ret .= ($this->mDoubleClickZoom==TRUE)?" map.enableDoubleClickZoom(); \n":"";

# handle map double click zooming
$ret .= ($this->mScrollWheelZoom==TRUE)?" map.enableScrollWheelZoom(); \n":""; "

espero que sea útil para alguien más!