title: Custom Zoom Control Results In Maximum Call Stack Size Exceeded Error
body: <p>I'm trying to change the zoom increment when using Google Maps JavaScript API on iOS. For example, instead of going from zoom 14 to zoom 15, I would like for it to go straight to zoom 16 and then zoom 18, and so on... when a user uses the pinch to zoom gesture.</p>
  
  <p>I know I can achieve this with buttons, but I can't seem to find a solution for pinch to zoom gesture. I realize that the <code>zoom_changed</code> event needs to be tracked.</p>
  
  <p>I get an error of <code>Maximum call stack size exceeded</code> with <code>map.setZoom(zoom + 2);</code> and <code>map.setZoom(zoom - 2);</code> when added on line 17 and 19, respectively.</p>
  
  <p>Check out this JSFiddle: <a href="http://jsfiddle.net/2zmn9173/4/" rel="nofollow">http://jsfiddle.net/2zmn9173/4/</a>. This is the part I need help with:</p>
  
  <pre><code>if (useragent.indexOf('iPhone') != -1) {
      google.maps.event.addListener(map, 'zoom_changed', function () {
          if (map.getZoom() &gt; zoom) {
              alert("ZOOMED IN from Level " + zoom);
          } else if (map.getZoom() &lt; zoom) {
              alert("ZOOMED OUT from Level " + zoom);
          }
          zoom = map.getZoom();
      });
  }
  </code></pre>
  
  <p>The buttons on top demonstrate the functionality I am trying to achieve, but with pinch to zoom gesture.</p>