<?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 Re: Help about ZoomControls in Java Maps SDK Questions</title>
    <link>https://community.esri.com/t5/java-maps-sdk-questions/help-about-zoomcontrols/m-p/239240#M689</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i used your alternative apporach . but i get exception&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;public void zoomControl(boolean zoom) {&lt;/P&gt;&lt;P&gt;var lods = tiledLayer.getTileInfo().getLevelsOfDetail(); &lt;BR /&gt; tiledLayer.setMaxScale(lods.get(18).getScale());&lt;BR /&gt; tiledLayer.setMinScale(lods.get(0).getScale());&lt;BR /&gt; double MaxZoomLevel = tiledLayer.getMaxScale();&lt;BR /&gt; double MinZoomLevel = tiledLayer.getMinScale();&lt;BR /&gt; &lt;BR /&gt; //zoomIn.setDisable(false);&lt;BR /&gt; //zoomOut.setDisable(false);&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; if(zoom == true) {&lt;BR /&gt; &lt;BR /&gt; Viewpoint current = mapView.getCurrentViewpoint(Viewpoint.Type.CENTER_AND_SCALE);&lt;BR /&gt; Viewpoint zoomedIn = new Viewpoint((Point) current.getTargetGeometry(), &lt;BR /&gt; current.getTargetScale() / 2.0);&lt;BR /&gt; &lt;BR /&gt; mapView.setViewpointAsync(zoomedIn);&lt;BR /&gt; &lt;STRONG&gt;mapView.addMapScaleChangedListener(s -&amp;gt; zoomIn.setDisable(mapView.getMapScale() &amp;lt;= lods.get(18).getScale()));&lt;/STRONG&gt;&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;else {&lt;BR /&gt; &lt;BR /&gt; Viewpoint current = mapView.getCurrentViewpoint(Viewpoint.Type.CENTER_AND_SCALE); &lt;BR /&gt; Viewpoint zoomedOut = new Viewpoint((Point) current.getTargetGeometry(), &lt;BR /&gt; current.getTargetScale() * 2.0);&lt;BR /&gt; &lt;BR /&gt; mapView.setViewpointAsync(zoomedOut);&lt;BR /&gt; &lt;BR /&gt; &lt;STRONG&gt;mapView.addMapScaleChangedListener(s -&amp;gt; zoomOut.setDisable(mapView.getMapScale() &amp;gt;= lods.get(0).getScale()));&lt;/STRONG&gt;&lt;BR /&gt; &lt;BR /&gt;}&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;==============================================================================&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Exception in thread "JavaFX Application Thread" java.lang.NullPointerException&lt;/STRONG&gt;&lt;BR /&gt; at iJMSFx/application.IJMSMap.lambda$1(IJMSMap.java:166)&lt;BR /&gt; at com.esri.arcgisruntime/com.esri.arcgisruntime.internal.mapping.view.MapScaleChangedListenerRunnerImpl.run(MapScaleChangedListenerRunnerImpl.java:51)&lt;BR /&gt; at com.esri.arcgisruntime/com.esri.arcgisruntime.internal.mapping.view.MapViewImpl$2.scaleChanged(MapViewImpl.java:101)&lt;BR /&gt; at com.esri.arcgisruntime/com.esri.arcgisruntime.internal.jni.CoreMapView.onScaleChanged(CoreMapView.java:366)&lt;BR /&gt; at com.esri.arcgisruntime/com.esri.arcgisruntime.internal.mapping.view.RenderingContext.nativePulse(Native Method)&lt;BR /&gt; at com.esri.arcgisruntime/com.esri.arcgisruntime.internal.mapping.view.RenderingContext.pulse(RenderingContext.java:97)&lt;BR /&gt; at java.base/java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:803)&lt;BR /&gt; at com.esri.arcgisruntime/com.esri.arcgisruntime.internal.mapping.view.PulseThread$1.handle(PulseThread.java:31)&lt;BR /&gt; at javafx.graphics/javafx.animation.AnimationTimer$AnimationTimerReceiver.lambda$handle$0(AnimationTimer.java:57)&lt;BR /&gt; at java.base/java.security.AccessController.doPrivileged(AccessController.java:389)&lt;BR /&gt; at javafx.graphics/javafx.animation.AnimationTimer$AnimationTimerReceiver.handle(AnimationTimer.java:56)&lt;BR /&gt; at javafx.graphics/com.sun.scenario.animation.AbstractMasterTimer.timePulseImpl(AbstractMasterTimer.java:357)&lt;BR /&gt; at javafx.graphics/com.sun.scenario.animation.AbstractMasterTimer$MainLoop.run(AbstractMasterTimer.java:267)&lt;BR /&gt; at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:515)&lt;BR /&gt; at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:499)&lt;BR /&gt; at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:492)&lt;BR /&gt; at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:320)&lt;BR /&gt; at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)&lt;BR /&gt; at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)&lt;BR /&gt; at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)&lt;BR /&gt; at java.base/java.lang.Thread.run(Thread.java:835)&lt;BR /&gt;Exception in thread "JavaFX Application Thread" java.lang.NullPointerException&lt;BR /&gt; at iJMSFx/application.IJMSMap.lambda$1(IJMSMap.java:166)&lt;BR /&gt; at com.esri.arcgisruntime/com.esri.arcgisruntime.internal.mapping.view.MapScaleChangedListenerRunnerImpl.run(MapScaleChangedListenerRunnerImpl.java:51)&lt;BR /&gt; at com.esri.arcgisruntime/com.esri.arcgisruntime.internal.mapping.view.MapViewImpl$2.scaleChanged(MapViewImpl.java:101)&lt;BR /&gt; at com.esri.arcgisruntime/com.esri.arcgisruntime.internal.jni.CoreMapView.onScaleChanged(CoreMapView.java:366)&lt;BR /&gt; at com.esri.arcgisruntime/com.esri.arcgisruntime.internal.mapping.view.RenderingContext.nativePulse(Native Method)&lt;BR /&gt; at com.esri.arcgisruntime/com.esri.arcgisruntime.internal.mapping.view.RenderingContext.pulse(RenderingContext.java:97)&lt;BR /&gt; at java.base/java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:803)&lt;BR /&gt; at com.esri.arcgisruntime/com.esri.arcgisruntime.internal.mapping.view.PulseThread$1.handle(PulseThread.java:31)&lt;BR /&gt; at javafx.graphics/javafx.animation.AnimationTimer$AnimationTimerReceiver.lambda$handle$0(AnimationTimer.java:57)&lt;BR /&gt; at java.base/java.security.AccessController.doPrivileged(AccessController.java:389)&lt;BR /&gt; at javafx.graphics/javafx.animation.AnimationTimer$AnimationTimerReceiver.handle(AnimationTimer.java:56)&lt;BR /&gt; at javafx.graphics/com.sun.scenario.animation.AbstractMasterTimer.timePulseImpl(AbstractMasterTimer.java:357)&lt;BR /&gt; at javafx.graphics/com.sun.scenario.animation.AbstractMasterTimer$MainLoop.run(AbstractMasterTimer.java:267)&lt;BR /&gt; at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:515)&lt;BR /&gt; at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:499)&lt;BR /&gt; at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:492)&lt;BR /&gt; at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:320)&lt;BR /&gt; at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)&lt;BR /&gt; at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)&lt;BR /&gt; at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)&lt;BR /&gt; at java.base/java.lang.Thread.run(Thread.java:835)&lt;BR /&gt;Exception in thread "JavaFX Application Thread" java.lang.NullPointerException&lt;BR /&gt; at iJMSFx/application.IJMSMap.lambda$1(IJMSMap.java:166)&lt;BR /&gt; at com.esri.arcgisruntime/com.esri.arcgisruntime.internal.mapping.view.MapScaleChangedListenerRunnerImpl.run(MapScaleChangedListenerRunnerImpl.java:51)&lt;BR /&gt; at com.esri.arcgisruntime/com.esri.arcgisruntime.internal.mapping.view.MapViewImpl$2.scaleChanged(MapViewImpl.java:101)&lt;BR /&gt; at com.esri.arcgisruntime/com.esri.arcgisruntime.internal.jni.CoreMapView.onScaleChanged(CoreMapView.java:366)&lt;BR /&gt; at com.esri.arcgisruntime/com.esri.arcgisruntime.internal.mapping.view.RenderingContext.nativePulse(Native Method)&lt;BR /&gt; at com.esri.arcgisruntime/com.esri.arcgisruntime.internal.mapping.view.RenderingContext.pulse(RenderingContext.java:97)&lt;BR /&gt; at java.base/java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:803)&lt;BR /&gt; at com.esri.arcgisruntime/com.esri.arcgisruntime.internal.mapping.view.PulseThread$1.handle(PulseThread.java:31)&lt;BR /&gt; at javafx.graphics/javafx.animation.AnimationTimer$AnimationTimerReceiver.lambda$handle$0(AnimationTimer.java:57)&lt;BR /&gt; at java.base/java.security.AccessController.doPrivileged(AccessController.java:389)&lt;BR /&gt; at javafx.graphics/javafx.animation.AnimationTimer$AnimationTimerReceiver.handle(AnimationTimer.java:56)&lt;BR /&gt; at javafx.graphics/com.sun.scenario.animation.AbstractMasterTimer.timePulseImpl(AbstractMasterTimer.java:357)&lt;BR /&gt; at javafx.graphics/com.sun.scenario.animation.AbstractMasterTimer$MainLoop.run(AbstractMasterTimer.java:267)&lt;BR /&gt; at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:515)&lt;BR /&gt; at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:499)&lt;BR /&gt; at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:492)&lt;BR /&gt; at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:320)&lt;BR /&gt; at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)&lt;BR /&gt; at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)&lt;BR /&gt; at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)&lt;BR /&gt; at java.base/java.lang.Thread.run(Thread.java:835)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Sep 2019 15:42:33 GMT</pubDate>
    <dc:creator>S_MMaruf</dc:creator>
    <dc:date>2019-09-04T15:42:33Z</dc:date>
    <item>
      <title>Help about ZoomControls</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/help-about-zoomcontrols/m-p/239232#M681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to develop zooControls like zoomIn and zoomOut.&amp;nbsp; i give below the code about zoomIn and ZoomOut.&lt;/P&gt;&lt;P&gt;public void zoomIn() {&lt;BR /&gt; double x, y;&lt;BR /&gt;x= mapView.getScaleX(); &lt;BR /&gt; y= mapView.getScaleY();&lt;BR /&gt; mapView.setScaleX(x+1);&lt;BR /&gt; mapView.setScaleY(y+1);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;public void zoomOut() {&lt;BR /&gt; double x, y;&lt;BR /&gt; &lt;BR /&gt; x= mapView.getScaleX(); &lt;BR /&gt; y= mapView.getScaleY(); &lt;BR /&gt; mapView.setScaleX(x-1);&lt;BR /&gt; mapView.setScaleY(y-1);&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;but the problem is when i click zoomIn button the mapview is overlaping with other pane and when i click zoomOut , it is not working and mapview is not zoomout within its stackpane like mouse's zoomIn and zoomout. i attach some code snippet.&lt;/P&gt;&lt;P&gt;For my&amp;nbsp; map application,&amp;nbsp;changes zoom level of map by +1 or -1 and&amp;nbsp;default minimum zoom level is 0, default maximum zoom level is 18.&lt;/P&gt;&lt;P&gt;so , there is another way to work with directly with mapview's zoom level?? above code is not working like mouse's zooming. can you guys give recommendation how to solve this problem?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Sep 2019 12:49:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/help-about-zoomcontrols/m-p/239232#M681</guid>
      <dc:creator>S_MMaruf</dc:creator>
      <dc:date>2019-09-02T12:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: Help about ZoomControls</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/help-about-zoomcontrols/m-p/239233#M682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The methods that you are trying to to use on the MapView refer to JavaFX scaling - literally scaling the size of the control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can zoom the map by changing the ViewPoint as shown below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Button zoomIn = new Button("Zoom in");&lt;BR /&gt; Button zoomOut = new Button("Zoom out");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;zoomIn.setOnAction(a -&amp;gt; {&lt;BR /&gt;&amp;nbsp; Viewpoint current = mapView.getCurrentViewpoint(Viewpoint.Type.CENTER_AND_SCALE);&lt;BR /&gt;&amp;nbsp; Viewpoint zoomedIn = new Viewpoint((Point) current.getTargetGeometry(), current.getTargetScale() / 2.0);&lt;BR /&gt;&amp;nbsp; mapView.setViewpointAsync(zoomedIn);&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;zoomOut.setOnAction(a -&amp;gt; {&lt;BR /&gt;&amp;nbsp; Viewpoint current = mapView.getCurrentViewpoint(Viewpoint.Type.CENTER_AND_SCALE);&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; Viewpoint zoomedOut = new Viewpoint((Point) current.getTargetGeometry(), current.getTargetScale() * 2.0);&lt;BR /&gt;&amp;nbsp; mapView.setViewpointAsync(zoomedOut);&lt;BR /&gt; });&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Sep 2019 13:17:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/help-about-zoomcontrols/m-p/239233#M682</guid>
      <dc:creator>ColinAnderson1</dc:creator>
      <dc:date>2019-09-02T13:17:11Z</dc:date>
    </item>
    <item>
      <title>Re: Help about ZoomControls</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/help-about-zoomcontrols/m-p/239234#M683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;your hint is nicely working. but how can i implement that zoomlevel max 18 and zoomlevel min 0?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Sep 2019 14:51:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/help-about-zoomcontrols/m-p/239234#M683</guid>
      <dc:creator>S_MMaruf</dc:creator>
      <dc:date>2019-09-02T14:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: Help about ZoomControls</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/help-about-zoomcontrols/m-p/239235#M684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can access the scale for each LOD something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var tiledLayer = new ArcGISTiledLayer("http://services.arcgisonline.com/arcgis/rest/services/World_Topo_Map/MapServer");&lt;BR /&gt;tiledLayer.addDoneLoadingListener(() -&amp;gt; {&lt;BR /&gt;&amp;nbsp; var lods = tiledLayer.getTileInfo().getLevelsOfDetail();&lt;BR /&gt;&amp;nbsp; lods.forEach(lod -&amp;gt; System.out.println(lod.getScale()));&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and use the scale in the zoom in/zoom out buttons.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Sep 2019 15:13:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/help-about-zoomcontrols/m-p/239235#M684</guid>
      <dc:creator>ColinAnderson1</dc:creator>
      <dc:date>2019-09-02T15:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: Help about ZoomControls</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/help-about-zoomcontrols/m-p/239236#M685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;thank you for the helpful reply . i am still facing confusion that for zoom control . i explain now little bit why i need zoom level , for map application max zoom level will be 18 and&amp;nbsp; when zoom level going 18 or 18 plus the zoomln button will be disable .for also zoomOut when zoomlevel 0 (min) will be reached then zoomOut button will be disable . for those i need to work with some how zoomlevel 18 and 0 for respective max and min and disable those two button on those two zoomlevel respectively. i am using Wmslayer Class in my map application.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;//zoomIn Button&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;public void zoomIn(ActionEvent event) {&lt;BR /&gt; &lt;BR /&gt; map.zoomControl(true) ;&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt; &lt;STRONG&gt;//zoomOut Button&lt;/STRONG&gt;&lt;BR /&gt; public void zoomOut(ActionEvent event) {&lt;BR /&gt; &lt;BR /&gt; map.zoomControl(false);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;//zoomControl method&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;public void zoomControl(boolean zoom) {&lt;/P&gt;&lt;P&gt;if(zoom == true) {&lt;BR /&gt; Viewpoint current = mapView.getCurrentViewpoint(Viewpoint.Type.CENTER_AND_SCALE);&lt;BR /&gt; Viewpoint zoomedIn = new Viewpoint((Point) current.getTargetGeometry(), &lt;BR /&gt; current.getTargetScale() / 2.0);&lt;BR /&gt; mapView.setViewpointAsync(zoomedIn);&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; }else {&lt;BR /&gt; &lt;BR /&gt; Viewpoint current = mapView.getCurrentViewpoint(Viewpoint.Type.CENTER_AND_SCALE); &lt;BR /&gt; Viewpoint zoomedOut = new Viewpoint((Point) current.getTargetGeometry(), &lt;BR /&gt; current.getTargetScale() * 2.0);&lt;BR /&gt; mapView.setViewpointAsync(zoomedOut);&lt;BR /&gt; &lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Sep 2019 12:12:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/help-about-zoomcontrols/m-p/239236#M685</guid>
      <dc:creator>S_MMaruf</dc:creator>
      <dc:date>2019-09-03T12:12:54Z</dc:date>
    </item>
    <item>
      <title>Re: Help about ZoomControls</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/help-about-zoomcontrols/m-p/239237#M686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you can do this by setting the min and max scales the the appropriate levels of detail e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tiledLayer.setMinScale(lods.get(0).getScale());&lt;/P&gt;&lt;P&gt;tiledLayer.setMaxScale(lods.get(18).getScale());&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Sep 2019 12:50:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/help-about-zoomcontrols/m-p/239237#M686</guid>
      <dc:creator>ColinAnderson1</dc:creator>
      <dc:date>2019-09-03T12:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: Help about ZoomControls</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/help-about-zoomcontrols/m-p/239238#M687</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 implement your idea . but it doesnt disable the button. can you help me to sort out where i am doing wrong&amp;nbsp; ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="border: 0px; font-weight: bold;"&gt;//zoomIn Button&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;public void zoomIn(ActionEvent event) {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;map.zoomControl(true) ;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;}&lt;BR /&gt;&lt;STRONG style="border: 0px; font-weight: bold;"&gt;//zoomOut Button&amp;nbsp;&lt;/STRONG&gt;&lt;BR /&gt;public void zoomOut(ActionEvent event) {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;map.zoomControl(false);&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; "&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: #ffffff; border: 0px; font-weight: bold;"&gt;//zoomControl method&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;public void zoomControl(boolean zoom) {&lt;/P&gt;&lt;P&gt;var lods = tiledLayer.getTileInfo().getLevelsOfDetail(); &lt;BR /&gt; tiledLayer.setMaxScale(lods.get(18).getScale());&lt;BR /&gt; tiledLayer.setMinScale(lods.get(0).getScale());&lt;BR /&gt; if(zoom == true) {&lt;BR /&gt; &lt;BR /&gt; Viewpoint current = mapView.getCurrentViewpoint(Viewpoint.Type.CENTER_AND_SCALE);&lt;BR /&gt; Viewpoint zoomedIn = new Viewpoint((Point) current.getTargetGeometry(), &lt;BR /&gt; current.getTargetScale() / 2.0);&lt;BR /&gt; mapView.setViewpointAsync(zoomedIn);&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; if (this.equals(tiledLayer.getMaxScale())) {&lt;BR /&gt; &lt;BR /&gt; zoomIn.setDisable(true);&lt;BR /&gt; }&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;else {&lt;BR /&gt; &lt;BR /&gt; Viewpoint current = mapView.getCurrentViewpoint(Viewpoint.Type.CENTER_AND_SCALE); &lt;BR /&gt; Viewpoint zoomedOut = new Viewpoint((Point) current.getTargetGeometry(), &lt;BR /&gt; current.getTargetScale() * 2.0);&lt;BR /&gt; mapView.setViewpointAsync(zoomedOut);&lt;BR /&gt; &lt;BR /&gt; if (this.equals(tiledLayer.getMinScale())) {&lt;BR /&gt; zoomIn.setDisable(true);&lt;BR /&gt; &lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;} &lt;BR /&gt; &lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2019 12:07:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/help-about-zoomcontrols/m-p/239238#M687</guid>
      <dc:creator>S_MMaruf</dc:creator>
      <dc:date>2019-09-04T12:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: Help about ZoomControls</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/help-about-zoomcontrols/m-p/239239#M688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;mapView.setViewpointAsync(zoomedIn) is an async call so you would have to add a done listener if you want to take action when the new scale is reached since it doesn’t happen immediately so something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mapView.setViewpointAsync(zoomedIn).addDoneListener(() -&amp;gt; {&lt;/P&gt;&lt;P&gt;  // check to see if zoom in or zoom out should be disabled/enabled&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An alternative would be to add a listener for scale changes on the MapView. As an example the following would disable the zoom in when you reach LOD 18 but otherwise enable the button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mapView.addMapScaleChangedListener(s -&amp;gt; zoomIn.setDisable(mapView.getMapScale() &amp;lt;= lods.get(18).getScale()));&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2019 13:10:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/help-about-zoomcontrols/m-p/239239#M688</guid>
      <dc:creator>ColinAnderson1</dc:creator>
      <dc:date>2019-09-04T13:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: Help about ZoomControls</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/help-about-zoomcontrols/m-p/239240#M689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i used your alternative apporach . but i get exception&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;public void zoomControl(boolean zoom) {&lt;/P&gt;&lt;P&gt;var lods = tiledLayer.getTileInfo().getLevelsOfDetail(); &lt;BR /&gt; tiledLayer.setMaxScale(lods.get(18).getScale());&lt;BR /&gt; tiledLayer.setMinScale(lods.get(0).getScale());&lt;BR /&gt; double MaxZoomLevel = tiledLayer.getMaxScale();&lt;BR /&gt; double MinZoomLevel = tiledLayer.getMinScale();&lt;BR /&gt; &lt;BR /&gt; //zoomIn.setDisable(false);&lt;BR /&gt; //zoomOut.setDisable(false);&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; if(zoom == true) {&lt;BR /&gt; &lt;BR /&gt; Viewpoint current = mapView.getCurrentViewpoint(Viewpoint.Type.CENTER_AND_SCALE);&lt;BR /&gt; Viewpoint zoomedIn = new Viewpoint((Point) current.getTargetGeometry(), &lt;BR /&gt; current.getTargetScale() / 2.0);&lt;BR /&gt; &lt;BR /&gt; mapView.setViewpointAsync(zoomedIn);&lt;BR /&gt; &lt;STRONG&gt;mapView.addMapScaleChangedListener(s -&amp;gt; zoomIn.setDisable(mapView.getMapScale() &amp;lt;= lods.get(18).getScale()));&lt;/STRONG&gt;&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;else {&lt;BR /&gt; &lt;BR /&gt; Viewpoint current = mapView.getCurrentViewpoint(Viewpoint.Type.CENTER_AND_SCALE); &lt;BR /&gt; Viewpoint zoomedOut = new Viewpoint((Point) current.getTargetGeometry(), &lt;BR /&gt; current.getTargetScale() * 2.0);&lt;BR /&gt; &lt;BR /&gt; mapView.setViewpointAsync(zoomedOut);&lt;BR /&gt; &lt;BR /&gt; &lt;STRONG&gt;mapView.addMapScaleChangedListener(s -&amp;gt; zoomOut.setDisable(mapView.getMapScale() &amp;gt;= lods.get(0).getScale()));&lt;/STRONG&gt;&lt;BR /&gt; &lt;BR /&gt;}&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;==============================================================================&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Exception in thread "JavaFX Application Thread" java.lang.NullPointerException&lt;/STRONG&gt;&lt;BR /&gt; at iJMSFx/application.IJMSMap.lambda$1(IJMSMap.java:166)&lt;BR /&gt; at com.esri.arcgisruntime/com.esri.arcgisruntime.internal.mapping.view.MapScaleChangedListenerRunnerImpl.run(MapScaleChangedListenerRunnerImpl.java:51)&lt;BR /&gt; at com.esri.arcgisruntime/com.esri.arcgisruntime.internal.mapping.view.MapViewImpl$2.scaleChanged(MapViewImpl.java:101)&lt;BR /&gt; at com.esri.arcgisruntime/com.esri.arcgisruntime.internal.jni.CoreMapView.onScaleChanged(CoreMapView.java:366)&lt;BR /&gt; at com.esri.arcgisruntime/com.esri.arcgisruntime.internal.mapping.view.RenderingContext.nativePulse(Native Method)&lt;BR /&gt; at com.esri.arcgisruntime/com.esri.arcgisruntime.internal.mapping.view.RenderingContext.pulse(RenderingContext.java:97)&lt;BR /&gt; at java.base/java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:803)&lt;BR /&gt; at com.esri.arcgisruntime/com.esri.arcgisruntime.internal.mapping.view.PulseThread$1.handle(PulseThread.java:31)&lt;BR /&gt; at javafx.graphics/javafx.animation.AnimationTimer$AnimationTimerReceiver.lambda$handle$0(AnimationTimer.java:57)&lt;BR /&gt; at java.base/java.security.AccessController.doPrivileged(AccessController.java:389)&lt;BR /&gt; at javafx.graphics/javafx.animation.AnimationTimer$AnimationTimerReceiver.handle(AnimationTimer.java:56)&lt;BR /&gt; at javafx.graphics/com.sun.scenario.animation.AbstractMasterTimer.timePulseImpl(AbstractMasterTimer.java:357)&lt;BR /&gt; at javafx.graphics/com.sun.scenario.animation.AbstractMasterTimer$MainLoop.run(AbstractMasterTimer.java:267)&lt;BR /&gt; at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:515)&lt;BR /&gt; at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:499)&lt;BR /&gt; at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:492)&lt;BR /&gt; at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:320)&lt;BR /&gt; at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)&lt;BR /&gt; at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)&lt;BR /&gt; at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)&lt;BR /&gt; at java.base/java.lang.Thread.run(Thread.java:835)&lt;BR /&gt;Exception in thread "JavaFX Application Thread" java.lang.NullPointerException&lt;BR /&gt; at iJMSFx/application.IJMSMap.lambda$1(IJMSMap.java:166)&lt;BR /&gt; at com.esri.arcgisruntime/com.esri.arcgisruntime.internal.mapping.view.MapScaleChangedListenerRunnerImpl.run(MapScaleChangedListenerRunnerImpl.java:51)&lt;BR /&gt; at com.esri.arcgisruntime/com.esri.arcgisruntime.internal.mapping.view.MapViewImpl$2.scaleChanged(MapViewImpl.java:101)&lt;BR /&gt; at com.esri.arcgisruntime/com.esri.arcgisruntime.internal.jni.CoreMapView.onScaleChanged(CoreMapView.java:366)&lt;BR /&gt; at com.esri.arcgisruntime/com.esri.arcgisruntime.internal.mapping.view.RenderingContext.nativePulse(Native Method)&lt;BR /&gt; at com.esri.arcgisruntime/com.esri.arcgisruntime.internal.mapping.view.RenderingContext.pulse(RenderingContext.java:97)&lt;BR /&gt; at java.base/java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:803)&lt;BR /&gt; at com.esri.arcgisruntime/com.esri.arcgisruntime.internal.mapping.view.PulseThread$1.handle(PulseThread.java:31)&lt;BR /&gt; at javafx.graphics/javafx.animation.AnimationTimer$AnimationTimerReceiver.lambda$handle$0(AnimationTimer.java:57)&lt;BR /&gt; at java.base/java.security.AccessController.doPrivileged(AccessController.java:389)&lt;BR /&gt; at javafx.graphics/javafx.animation.AnimationTimer$AnimationTimerReceiver.handle(AnimationTimer.java:56)&lt;BR /&gt; at javafx.graphics/com.sun.scenario.animation.AbstractMasterTimer.timePulseImpl(AbstractMasterTimer.java:357)&lt;BR /&gt; at javafx.graphics/com.sun.scenario.animation.AbstractMasterTimer$MainLoop.run(AbstractMasterTimer.java:267)&lt;BR /&gt; at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:515)&lt;BR /&gt; at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:499)&lt;BR /&gt; at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:492)&lt;BR /&gt; at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:320)&lt;BR /&gt; at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)&lt;BR /&gt; at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)&lt;BR /&gt; at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)&lt;BR /&gt; at java.base/java.lang.Thread.run(Thread.java:835)&lt;BR /&gt;Exception in thread "JavaFX Application Thread" java.lang.NullPointerException&lt;BR /&gt; at iJMSFx/application.IJMSMap.lambda$1(IJMSMap.java:166)&lt;BR /&gt; at com.esri.arcgisruntime/com.esri.arcgisruntime.internal.mapping.view.MapScaleChangedListenerRunnerImpl.run(MapScaleChangedListenerRunnerImpl.java:51)&lt;BR /&gt; at com.esri.arcgisruntime/com.esri.arcgisruntime.internal.mapping.view.MapViewImpl$2.scaleChanged(MapViewImpl.java:101)&lt;BR /&gt; at com.esri.arcgisruntime/com.esri.arcgisruntime.internal.jni.CoreMapView.onScaleChanged(CoreMapView.java:366)&lt;BR /&gt; at com.esri.arcgisruntime/com.esri.arcgisruntime.internal.mapping.view.RenderingContext.nativePulse(Native Method)&lt;BR /&gt; at com.esri.arcgisruntime/com.esri.arcgisruntime.internal.mapping.view.RenderingContext.pulse(RenderingContext.java:97)&lt;BR /&gt; at java.base/java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:803)&lt;BR /&gt; at com.esri.arcgisruntime/com.esri.arcgisruntime.internal.mapping.view.PulseThread$1.handle(PulseThread.java:31)&lt;BR /&gt; at javafx.graphics/javafx.animation.AnimationTimer$AnimationTimerReceiver.lambda$handle$0(AnimationTimer.java:57)&lt;BR /&gt; at java.base/java.security.AccessController.doPrivileged(AccessController.java:389)&lt;BR /&gt; at javafx.graphics/javafx.animation.AnimationTimer$AnimationTimerReceiver.handle(AnimationTimer.java:56)&lt;BR /&gt; at javafx.graphics/com.sun.scenario.animation.AbstractMasterTimer.timePulseImpl(AbstractMasterTimer.java:357)&lt;BR /&gt; at javafx.graphics/com.sun.scenario.animation.AbstractMasterTimer$MainLoop.run(AbstractMasterTimer.java:267)&lt;BR /&gt; at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:515)&lt;BR /&gt; at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:499)&lt;BR /&gt; at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:492)&lt;BR /&gt; at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:320)&lt;BR /&gt; at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)&lt;BR /&gt; at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)&lt;BR /&gt; at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)&lt;BR /&gt; at java.base/java.lang.Thread.run(Thread.java:835)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2019 15:42:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/help-about-zoomcontrols/m-p/239240#M689</guid>
      <dc:creator>S_MMaruf</dc:creator>
      <dc:date>2019-09-04T15:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: Help about ZoomControls</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/help-about-zoomcontrols/m-p/239241#M690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think maybe you are adding the MapView scale listener in the wrong place. Try something like this which should disable the zoom in once you reach LOD 18 and enable it if you zoom back out…&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import com.esri.arcgisruntime.geometry.Point;&lt;/P&gt;&lt;P&gt;import com.esri.arcgisruntime.layers.ArcGISTiledLayer;&lt;/P&gt;&lt;P&gt;import com.esri.arcgisruntime.mapping.ArcGISMap;&lt;/P&gt;&lt;P&gt;import com.esri.arcgisruntime.mapping.Basemap;&lt;/P&gt;&lt;P&gt;import com.esri.arcgisruntime.mapping.Viewpoint;&lt;/P&gt;&lt;P&gt;import com.esri.arcgisruntime.mapping.view.MapView;&lt;/P&gt;&lt;P&gt;import javafx.application.Application;&lt;/P&gt;&lt;P&gt;import javafx.application.Platform;&lt;/P&gt;&lt;P&gt;import javafx.scene.Scene;&lt;/P&gt;&lt;P&gt;import javafx.scene.control.Button;&lt;/P&gt;&lt;P&gt;import javafx.scene.layout.BorderPane;&lt;/P&gt;&lt;P&gt;import javafx.scene.layout.HBox;&lt;/P&gt;&lt;P&gt;import javafx.stage.Stage;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;public class App extends Application {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  MapView mapView = new MapView();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  @Override&lt;/P&gt;&lt;P&gt;  public void start(Stage stage) throws Exception {&lt;/P&gt;&lt;P&gt;    Platform.setImplicitExit(true);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    var borderPane = new BorderPane();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    var scene = new Scene(borderPane);&lt;/P&gt;&lt;P&gt;    stage.setScene(scene);&lt;/P&gt;&lt;P&gt;    stage.setWidth(500);&lt;/P&gt;&lt;P&gt;    stage.setHeight(500);&lt;/P&gt;&lt;P&gt;    stage.show();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    var map = new ArcGISMap();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    var tiledLayer = new ArcGISTiledLayer("http://services.arcgisonline.com/arcgis/rest/services/World_Topo_Map/MapServer");;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    tiledLayer.addDoneLoadingListener(() -&amp;gt; {&lt;/P&gt;&lt;P&gt;      var lods = tiledLayer.getTileInfo().getLevelsOfDetail();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      lods.forEach(lod -&amp;gt; System.out.println(lod.getLevel() + " " + lod.getScale() + " " + lod.getResolution()));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      //tiledLayer.setMinScale(lods.get(0).getScale());&lt;/P&gt;&lt;P&gt;      //tiledLayer.setMaxScale(lods.get(18).getScale());&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      HBox box = new HBox();&lt;/P&gt;&lt;P&gt;      borderPane.setBottom(box);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      Button zoomIn = new Button("Zoom in");&lt;/P&gt;&lt;P&gt;      Button zoomOut = new Button("Zoom out");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      zoomIn.setOnAction(a -&amp;gt; {&lt;/P&gt;&lt;P&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;/P&gt;&lt;P&gt;      });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      zoomOut.setOnAction(a -&amp;gt; {&lt;/P&gt;&lt;P&gt;        Viewpoint current = mapView.getCurrentViewpoint(Viewpoint.Type.CENTER_AND_SCALE);&lt;/P&gt;&lt;P&gt;        Viewpoint zoomedOut = new Viewpoint((Point) current.getTargetGeometry(), current.getTargetScale() * 2.0);&lt;/P&gt;&lt;P&gt;        mapView.setViewpointAsync(zoomedOut);&lt;/P&gt;&lt;P&gt;      });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      box.getChildren().addAll(zoomIn, zoomOut);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      mapView.addMapScaleChangedListener(s -&amp;gt; zoomIn.setDisable(mapView.getMapScale() &amp;lt;= lods.get(18).getScale()));&lt;/P&gt;&lt;P&gt;    });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Basemap basemap = new Basemap();&lt;/P&gt;&lt;P&gt;    basemap.getBaseLayers().add(tiledLayer);&lt;/P&gt;&lt;P&gt;    map.setBasemap(basemap);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    mapView.setMap(map);&lt;/P&gt;&lt;P&gt;    borderPane.setCenter(mapView);&lt;/P&gt;&lt;P&gt;  }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  @Override&lt;/P&gt;&lt;P&gt;  public void stop() throws Exception {&lt;/P&gt;&lt;P&gt;    if (mapView != null) {&lt;/P&gt;&lt;P&gt;      mapView.dispose();&lt;/P&gt;&lt;P&gt;    }&lt;/P&gt;&lt;P&gt;  }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  public static void main(String[] args) {&lt;/P&gt;&lt;P&gt;    launch(args);&lt;/P&gt;&lt;P&gt;  }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2019 17:12:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/help-about-zoomcontrols/m-p/239241#M690</guid>
      <dc:creator>ColinAnderson1</dc:creator>
      <dc:date>2019-09-04T17:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: Help about ZoomControls</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/help-about-zoomcontrols/m-p/239242#M691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi , you code nicely working . i also need to disable zoomOut button disable in zoomlevel 0 . i write code under the zoomIn button disable code . my zoomOut button is not disable . am i some thing missing can you help me ?&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;tiledLayer.addDoneLoadingListener(() -&amp;gt; {&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var lods = tiledLayer.getTileInfo().getLevelsOfDetail();&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lods.forEach(lod -&amp;gt; System.out.println(lod.getLevel() + " " + lod.getScale() + " " + lod.getResolution()));&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //tiledLayer.setMinScale(lods.get(0).getScale());&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //tiledLayer.setMaxScale(lods.get(18).getScale());&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HBox box = new HBox();&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; borderPane.setBottom(box);&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Button zoomIn = new Button("Zoom in");&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Button zoomOut = new Button("Zoom out");&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; zoomIn.setOnAction(a -&amp;gt; {&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Viewpoint current = mapView.getCurrentViewpoint(Viewpoint.Type.CENTER_AND_SCALE);&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Viewpoint zoomedIn = new Viewpoint((Point) current.getTargetGeometry(), current.getTargetScale() / 2.0);&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; zoomOut.setOnAction(a -&amp;gt; {&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Viewpoint current = mapView.getCurrentViewpoint(Viewpoint.Type.CENTER_AND_SCALE);&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Viewpoint zoomedOut = new Viewpoint((Point) current.getTargetGeometry(), current.getTargetScale() * 2.0);&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mapView.setViewpointAsync(zoomedOut);&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; box.getChildren().addAll(zoomIn, zoomOut);&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mapView.addMapScaleChangedListener(s -&amp;gt; zoomIn.setDisable(mapView.getMapScale() &amp;lt;= lods.get(18).getScale()));&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;STRONG&gt;mapView.addMapScaleChangedListener(s -&amp;gt; zoomOut.setDisable(mapView.getMapScale() &amp;gt;= lods.get(0).getScale()));&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Basemap basemap = new Basemap();&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; basemap.getBaseLayers().add(tiledLayer);&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.setBasemap(basemap);&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mapView.setMap(map);&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; borderPane.setCenter(mapView);&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2019 09:35:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/help-about-zoomcontrols/m-p/239242#M691</guid>
      <dc:creator>S_MMaruf</dc:creator>
      <dc:date>2019-09-05T09:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: Help about ZoomControls</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/help-about-zoomcontrols/m-p/239243#M692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The logic is good. The problem I think is that the view is not zooming out to LOD 0. If you set another LOD e.g. 5 you will see it works. Also if you make your window smaller it becomes possible to zoom to LOD 0.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2019 09:58:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/help-about-zoomcontrols/m-p/239243#M692</guid>
      <dc:creator>ColinAnderson1</dc:creator>
      <dc:date>2019-09-05T09:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: Help about ZoomControls</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/help-about-zoomcontrols/m-p/239244#M693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;hi&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;i used different way to implement your code . but it doesnt working . i am little bit confused now where i put these code . i implemented in button action event but no result. my application is following decoupled way .can you check for where and what i am missing . also i am using javafxml to create view part of my map application. in my project button action event should be in another class.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;// this is my map class//&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;public class IJMSMap implements MapInterface {&lt;BR /&gt;private MapView mapView;&lt;BR /&gt; private Point p;&lt;BR /&gt; private ArcGISMap map ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@FXML private Button zoomOut;&lt;BR /&gt; @FXML private Button zoomIn;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ArcGISTiledLayer tiledLayer = new ArcGISTiledLayer("http://services.arcgisonline.com/arcgis/rest/services/Canvas/World_Light_Gray_Base/MapServer"); &lt;BR /&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;public IJMSMap(MapView mapView) {&lt;BR /&gt; this.mapView = mapView;&lt;BR /&gt; &lt;BR /&gt; // create an ArcGISMap with the default imagery basemap&lt;BR /&gt; this.map = new ArcGISMap(new Basemap(tiledLayer));&lt;BR /&gt;// display the map by setting the map on the map view&lt;BR /&gt; mapView.setMap(this.map);&lt;BR /&gt; Point envelope = new Point(0.0, 0.0, SpatialReferences.getWgs84());&lt;BR /&gt; mapView.setViewpointGeometryAsync(envelope);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// this is controller class which contains zoom&amp;nbsp; button action event//&lt;/P&gt;&lt;P&gt;public class MapLayOutController implements Initializable {&lt;/P&gt;&lt;P&gt;@FXML&lt;BR /&gt; private StackPane MapPane ;&lt;BR /&gt; //private MapView MapView;&lt;BR /&gt; //private IJMSMap map;&lt;BR /&gt;@FXML private VBox controlVbox;&lt;BR /&gt; @FXML private Button zoomOut;&lt;BR /&gt; @FXML private Button zoomIn;&lt;BR /&gt; private CheckBox layer;&lt;BR /&gt; @FXML private HBox zoomBtnHbox;&lt;BR /&gt; &lt;BR /&gt; private MapView MapView = new MapView();&lt;BR /&gt; private IJMSMap map = new IJMSMap(this.MapView);&lt;BR /&gt; ArcGISTiledLayer tiledLayer = new ArcGISTiledLayer("http://services.arcgisonline.com/arcgis/rest/services/Canvas/World_Light_Gray_Base/MapServer");&lt;BR /&gt; &lt;BR /&gt; @FXML&lt;BR /&gt; private StackPane PanButtonContainerPane;&lt;/P&gt;&lt;P&gt;@Override&lt;BR /&gt; public void initialize(URL location, ResourceBundle resources) {&lt;BR /&gt; this.MapView = new MapView();&lt;BR /&gt; this.map = new IJMSMap(this.MapView);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; this.PanButtonContainerPane.getChildren().add(MapView);&lt;/P&gt;&lt;P&gt;this.movePanNorth.toFront();&lt;/P&gt;&lt;P&gt;this.movePanEast.toFront();&lt;BR /&gt; this.MovePanSouth.toFront();&lt;BR /&gt; this.movePanWest.toFront();&lt;BR /&gt; this.zoomBtnHbox.toFront();&lt;BR /&gt; &lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;public void zoomIn(ActionEvent event) {&lt;BR /&gt; &lt;BR /&gt; &lt;STRONG&gt;tiledLayer.addDoneLoadingListener(() -&amp;gt; {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; var lods = tiledLayer.getTileInfo().getLevelsOfDetail();&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; zoomIn.setOnAction(a -&amp;gt; {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; Viewpoint current = MapView.getCurrentViewpoint(Viewpoint.Type.CENTER_AND_SCALE);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Viewpoint zoomedIn = new Viewpoint((Point) current.getTargetGeometry(), current.getTargetScale() / 2.0);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; MapView.setViewpointAsync(zoomedIn);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; });&lt;/STRONG&gt;&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;&lt;STRONG&gt; MapView.addMapScaleChangedListener(s -&amp;gt; zoomIn.setDisable(MapView.getMapScale() &amp;lt;= lods.get(18).getScale()));&lt;/STRONG&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;STRONG&gt; });&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;BR /&gt; } &lt;BR /&gt; &lt;BR /&gt; public void zoomOut(ActionEvent event) {&lt;BR /&gt; &lt;BR /&gt; &lt;STRONG&gt;tiledLayer.addDoneLoadingListener(() -&amp;gt; {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; var lods = tiledLayer.getTileInfo().getLevelsOfDetail();&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; zoomIn.setOnAction(a -&amp;gt; {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; Viewpoint current = MapView.getCurrentViewpoint(Viewpoint.Type.CENTER_AND_SCALE);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Viewpoint zoomedIn = new Viewpoint((Point) current.getTargetGeometry(), current.getTargetScale() / 2.0);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; MapView.setViewpointAsync(zoomedIn);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; });&lt;/STRONG&gt;&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;&lt;STRONG&gt; MapView.addMapScaleChangedListener(s -&amp;gt; zoomIn.setDisable(MapView.getMapScale() &amp;gt;= lods.get(18).getScale()));&lt;/STRONG&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;STRONG&gt; });&lt;/STRONG&gt;&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2019 11:01:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/help-about-zoomcontrols/m-p/239244#M693</guid>
      <dc:creator>S_MMaruf</dc:creator>
      <dc:date>2019-09-05T11:01:54Z</dc:date>
    </item>
  </channel>
</rss>

