<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Mouse Wheel Zooming disable in Java Maps SDK Questions</title>
    <link>https://community.esri.com/t5/java-maps-sdk-questions/mouse-wheel-zooming-disable/m-p/229496#M637</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to disable mouse wheel zoom&amp;nbsp; at max zoom level 18 and min zoom level 3 . I created scroll event which disable zoombuttons&amp;nbsp; at max zoom level and min zoom level when I do zoomIn and zoomOut at those level by using mouse wheel zoom. i also use "&lt;STRONG&gt;mapView.setEnableMouseZoom(false)" .&amp;nbsp;&lt;/STRONG&gt;what am i missing , i dont understand . so can anyone help me to figure out what is the wrong?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;// zoomIn and zoomOut by using mouse wheel.&lt;/STRONG&gt;&lt;BR /&gt; mapView.setOnScroll(new EventHandler&amp;lt;ScrollEvent&amp;gt;() {&lt;BR /&gt; public void handle(ScrollEvent se) {&lt;BR /&gt; &lt;STRONG&gt;// zoomIn by using mouse wheel and zooIn Button disable at zoom level at 18 while using mouse wheel zoomIn&lt;/STRONG&gt; &lt;BR /&gt; zoomOut.setDisable(false);&lt;BR /&gt; &lt;BR /&gt; map.zoomInFunction();&lt;BR /&gt; if (mapView.getMapScale() &amp;lt;= 2256.994353) {&lt;BR /&gt; zoomIn.setDisable(true);&lt;BR /&gt; &lt;STRONG&gt;mapView.setEnableMouseZoom(false);&lt;/STRONG&gt;&lt;BR /&gt; &lt;BR /&gt; }&lt;BR /&gt; &lt;STRONG&gt;// zoomOut by using mouse wheel and zoomOut Button disable at zoom level at 3 while using mouse wheel zoomOut&lt;/STRONG&gt;&lt;BR /&gt; if (se.getDeltaY()&amp;lt;0) {&lt;BR /&gt; zoomIn.setDisable(false);&lt;BR /&gt; map.zoomOutFunction();&lt;BR /&gt; if (mapView.getMapScale() &amp;gt;= 7.3957190948944E7) {&lt;BR /&gt; zoomOut.setDisable(true);&lt;BR /&gt; &lt;STRONG&gt;mapView.setEnableMouseZoom(false);&lt;/STRONG&gt;&lt;BR /&gt; }&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;public void &lt;STRONG&gt;zoomInFunction()&lt;/STRONG&gt; {&lt;BR /&gt;Viewpoint current = mapView.getCurrentViewpoint(Viewpoint.Type.CENTER_AND_SCALE);&lt;/P&gt;&lt;P&gt;Viewpoint zoomedIn = new Viewpoint((Point) current.getTargetGeometry(), current.getTargetScale() / 2.0);&lt;BR /&gt; mapView.setViewpointAsync(zoomedIn);&lt;BR /&gt; System.out.println(current.getTargetScale() / 2);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt; &lt;BR /&gt; public void &lt;STRONG&gt;zoomOutFunction()&lt;/STRONG&gt;&lt;BR /&gt; {&lt;BR /&gt; Viewpoint current = mapView.getCurrentViewpoint(Viewpoint.Type.CENTER_AND_SCALE);&lt;/P&gt;&lt;P&gt;Viewpoint zoomedIn = new Viewpoint((Point) current.getTargetGeometry(), current.getTargetScale() * 2.0);&lt;BR /&gt; mapView.setViewpointAsync(zoomedIn);&lt;BR /&gt; System.out.println(current.getTargetScale() * 2);&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Sep 2019 10:41:26 GMT</pubDate>
    <dc:creator>S_MMaruf</dc:creator>
    <dc:date>2019-09-17T10:41:26Z</dc:date>
    <item>
      <title>Mouse Wheel Zooming disable</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/mouse-wheel-zooming-disable/m-p/229496#M637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to disable mouse wheel zoom&amp;nbsp; at max zoom level 18 and min zoom level 3 . I created scroll event which disable zoombuttons&amp;nbsp; at max zoom level and min zoom level when I do zoomIn and zoomOut at those level by using mouse wheel zoom. i also use "&lt;STRONG&gt;mapView.setEnableMouseZoom(false)" .&amp;nbsp;&lt;/STRONG&gt;what am i missing , i dont understand . so can anyone help me to figure out what is the wrong?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;// zoomIn and zoomOut by using mouse wheel.&lt;/STRONG&gt;&lt;BR /&gt; mapView.setOnScroll(new EventHandler&amp;lt;ScrollEvent&amp;gt;() {&lt;BR /&gt; public void handle(ScrollEvent se) {&lt;BR /&gt; &lt;STRONG&gt;// zoomIn by using mouse wheel and zooIn Button disable at zoom level at 18 while using mouse wheel zoomIn&lt;/STRONG&gt; &lt;BR /&gt; zoomOut.setDisable(false);&lt;BR /&gt; &lt;BR /&gt; map.zoomInFunction();&lt;BR /&gt; if (mapView.getMapScale() &amp;lt;= 2256.994353) {&lt;BR /&gt; zoomIn.setDisable(true);&lt;BR /&gt; &lt;STRONG&gt;mapView.setEnableMouseZoom(false);&lt;/STRONG&gt;&lt;BR /&gt; &lt;BR /&gt; }&lt;BR /&gt; &lt;STRONG&gt;// zoomOut by using mouse wheel and zoomOut Button disable at zoom level at 3 while using mouse wheel zoomOut&lt;/STRONG&gt;&lt;BR /&gt; if (se.getDeltaY()&amp;lt;0) {&lt;BR /&gt; zoomIn.setDisable(false);&lt;BR /&gt; map.zoomOutFunction();&lt;BR /&gt; if (mapView.getMapScale() &amp;gt;= 7.3957190948944E7) {&lt;BR /&gt; zoomOut.setDisable(true);&lt;BR /&gt; &lt;STRONG&gt;mapView.setEnableMouseZoom(false);&lt;/STRONG&gt;&lt;BR /&gt; }&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;public void &lt;STRONG&gt;zoomInFunction()&lt;/STRONG&gt; {&lt;BR /&gt;Viewpoint current = mapView.getCurrentViewpoint(Viewpoint.Type.CENTER_AND_SCALE);&lt;/P&gt;&lt;P&gt;Viewpoint zoomedIn = new Viewpoint((Point) current.getTargetGeometry(), current.getTargetScale() / 2.0);&lt;BR /&gt; mapView.setViewpointAsync(zoomedIn);&lt;BR /&gt; System.out.println(current.getTargetScale() / 2);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt; &lt;BR /&gt; public void &lt;STRONG&gt;zoomOutFunction()&lt;/STRONG&gt;&lt;BR /&gt; {&lt;BR /&gt; Viewpoint current = mapView.getCurrentViewpoint(Viewpoint.Type.CENTER_AND_SCALE);&lt;/P&gt;&lt;P&gt;Viewpoint zoomedIn = new Viewpoint((Point) current.getTargetGeometry(), current.getTargetScale() * 2.0);&lt;BR /&gt; mapView.setViewpointAsync(zoomedIn);&lt;BR /&gt; System.out.println(current.getTargetScale() * 2);&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Sep 2019 10:41:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/mouse-wheel-zooming-disable/m-p/229496#M637</guid>
      <dc:creator>S_MMaruf</dc:creator>
      <dc:date>2019-09-17T10:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: Mouse Wheel Zooming disable</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/mouse-wheel-zooming-disable/m-p/1469958#M2857</link>
      <description>&lt;P&gt;Use&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;``` view&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;navigation&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;mouseWheelZoomEnabled &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;false&lt;/SPAN&gt;&lt;SPAN&gt;; ```&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 15 May 2024 02:11:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/mouse-wheel-zooming-disable/m-p/1469958#M2857</guid>
      <dc:creator>NikitaFriesen</dc:creator>
      <dc:date>2024-05-15T02:11:16Z</dc:date>
    </item>
  </channel>
</rss>

