<?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 Can't zoom out on raster layer in ArcGIS Runtime SDK for WPF (Retired) Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/can-t-zoom-out-on-raster-layer/m-p/1052191#M3816</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Dear Gurus!&lt;BR /&gt;&lt;BR /&gt;I would like to implement zoom out on map which contains raster layer.&lt;BR /&gt;I created simple program to check this option, but can't understand how to do it.&lt;BR /&gt;&lt;BR /&gt;So, here is my code:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;public partial class MainWindow : Window
    {
        MapView _mapView = null;
        public MainWindow()
        {
            InitializeComponent();

            _mapView = MyMapView;            
            try
            {
                #region Raster
                
                string qwe4 = Path.GetFullPath(@"D:\to_check_img\12_daniel_can_bc-207.jpg");
                
                RasterLayer myRasterLayer4 = new RasterLayer(qwe4);
                //myRasterLayer.MinScale = 450000;
                //myRasterLayer.MaxScale = 1000000;
                
                LoadRaster(myRasterLayer4);

                Map map = new Map();               
                map.OperationalLayers.Add(myRasterLayer4);
                MyMapView.Map = map;
                #endregion                
            }
            catch (Exception ex)
            {

            }
        }        

        private async void LoadRaster(RasterLayer myRasterLayer)
        {
            await myRasterLayer.LoadAsync();            
            ///not working
            //await _mapView.SetViewpointScaleAsync(50000);
            //await _mapView.SetViewpointCenterAsync(new MapPoint(myRasterLayer.FullExtent.XMin, myRasterLayer.FullExtent.YMin), 50000);                        
        }

    }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;After it, I see an image on map with current scale. For it I added&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;Grid&amp;gt;
        &amp;lt;quartz:MapView x:Name="MyMapView" Margin="-21,-26,21,26" /&amp;gt;
        &amp;lt;TextBlock Margin="469,10,50,380"&amp;gt;
                    &amp;lt;!--  A run is used to format the label.  --&amp;gt;
                    &amp;lt;Run Text="Current map scale: " /&amp;gt;
                    &amp;lt;Run Text="1:" /&amp;gt;
                    &amp;lt;Run Text="{Binding ElementName=MyMapView, Path=MapScale, Mode=OneWay, StringFormat=n0}" /&amp;gt;
        &amp;lt;/TextBlock&amp;gt;
    &amp;lt;/Grid&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;When I run an application I see image with current scale:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NazarSamardak_0-1619611368828.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/12046i3AE37513284733D0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NazarSamardak_0-1619611368828.png" alt="NazarSamardak_0-1619611368828.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;But I don't have a possibility to zoom out from this scale.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I really need to know if there is any possibility to zoom out when we have a nongeoreferenced map and image layer on it.&lt;BR /&gt;&lt;BR /&gt;As you&amp;nbsp; see I tried to use MinScale, MaxScale,&amp;nbsp;SetViewpointScaleAsync, but it didn't work.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Apr 2021 12:09:19 GMT</pubDate>
    <dc:creator>NazarSamardak</dc:creator>
    <dc:date>2021-04-28T12:09:19Z</dc:date>
    <item>
      <title>Can't zoom out on raster layer</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/can-t-zoom-out-on-raster-layer/m-p/1052191#M3816</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Dear Gurus!&lt;BR /&gt;&lt;BR /&gt;I would like to implement zoom out on map which contains raster layer.&lt;BR /&gt;I created simple program to check this option, but can't understand how to do it.&lt;BR /&gt;&lt;BR /&gt;So, here is my code:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;public partial class MainWindow : Window
    {
        MapView _mapView = null;
        public MainWindow()
        {
            InitializeComponent();

            _mapView = MyMapView;            
            try
            {
                #region Raster
                
                string qwe4 = Path.GetFullPath(@"D:\to_check_img\12_daniel_can_bc-207.jpg");
                
                RasterLayer myRasterLayer4 = new RasterLayer(qwe4);
                //myRasterLayer.MinScale = 450000;
                //myRasterLayer.MaxScale = 1000000;
                
                LoadRaster(myRasterLayer4);

                Map map = new Map();               
                map.OperationalLayers.Add(myRasterLayer4);
                MyMapView.Map = map;
                #endregion                
            }
            catch (Exception ex)
            {

            }
        }        

        private async void LoadRaster(RasterLayer myRasterLayer)
        {
            await myRasterLayer.LoadAsync();            
            ///not working
            //await _mapView.SetViewpointScaleAsync(50000);
            //await _mapView.SetViewpointCenterAsync(new MapPoint(myRasterLayer.FullExtent.XMin, myRasterLayer.FullExtent.YMin), 50000);                        
        }

    }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;After it, I see an image on map with current scale. For it I added&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;Grid&amp;gt;
        &amp;lt;quartz:MapView x:Name="MyMapView" Margin="-21,-26,21,26" /&amp;gt;
        &amp;lt;TextBlock Margin="469,10,50,380"&amp;gt;
                    &amp;lt;!--  A run is used to format the label.  --&amp;gt;
                    &amp;lt;Run Text="Current map scale: " /&amp;gt;
                    &amp;lt;Run Text="1:" /&amp;gt;
                    &amp;lt;Run Text="{Binding ElementName=MyMapView, Path=MapScale, Mode=OneWay, StringFormat=n0}" /&amp;gt;
        &amp;lt;/TextBlock&amp;gt;
    &amp;lt;/Grid&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;When I run an application I see image with current scale:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NazarSamardak_0-1619611368828.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/12046i3AE37513284733D0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NazarSamardak_0-1619611368828.png" alt="NazarSamardak_0-1619611368828.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;But I don't have a possibility to zoom out from this scale.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I really need to know if there is any possibility to zoom out when we have a nongeoreferenced map and image layer on it.&lt;BR /&gt;&lt;BR /&gt;As you&amp;nbsp; see I tried to use MinScale, MaxScale,&amp;nbsp;SetViewpointScaleAsync, but it didn't work.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Apr 2021 12:09:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/can-t-zoom-out-on-raster-layer/m-p/1052191#M3816</guid>
      <dc:creator>NazarSamardak</dc:creator>
      <dc:date>2021-04-28T12:09:19Z</dc:date>
    </item>
  </channel>
</rss>

