<?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: RasterLayer in android sdk in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/rasterlayer-in-android-sdk/m-p/152489#M1092</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may want to listen for when the map status has changed, then call setExtent on the mMapView when the raster layer has finished loading. Consider the following...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView&lt;/SPAN&gt;.setOnStatusChangedListener(&lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;OnStatusChangedListener() {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808000;"&gt;@Override&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808000;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;public void &lt;/SPAN&gt;onStatusChanged(Object source, STATUS status) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;if&lt;/SPAN&gt;(source &lt;SPAN style="color: #000080; font-weight: bold;"&gt;instanceof &lt;/SPAN&gt;RasterLayer &amp;amp;&amp;amp; STATUS.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;LAYER_LOADED &lt;/SPAN&gt;== status){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView&lt;/SPAN&gt;.setExtent(&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;rasterLayer.getExtent()&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;2&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Jul 2015 05:59:18 GMT</pubDate>
    <dc:creator>EricBader</dc:creator>
    <dc:date>2015-07-24T05:59:18Z</dc:date>
    <item>
      <title>RasterLayer in android sdk</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/rasterlayer-in-android-sdk/m-p/152488#M1091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying add raster layer like tiff to the map, and I use the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;FileRasterSource rasterSource = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;FileRasterSource(file);

&lt;SPAN style="color: #000080; font-weight: bold;"&gt;final &lt;/SPAN&gt;RasterLayer rasterLayer = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;RasterLayer(rasterSource);
&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView&lt;/SPAN&gt;.addLayer(rasterLayer);&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works, however once I want to set the layer to fill the veiewport of the map:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView&lt;/SPAN&gt;.setExtent(&lt;SPAN style="color: #660e7a;"&gt;rasterLayer&lt;/SPAN&gt;.getExtent());&lt;/PRE&gt;&lt;P&gt;It does not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And what's more, I found that the map can not be zoom out at a certain scale. I am not sure why.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 08:10:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/rasterlayer-in-android-sdk/m-p/152488#M1091</guid>
      <dc:creator>kkkk1</dc:creator>
      <dc:date>2021-12-11T08:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: RasterLayer in android sdk</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/rasterlayer-in-android-sdk/m-p/152489#M1092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may want to listen for when the map status has changed, then call setExtent on the mMapView when the raster layer has finished loading. Consider the following...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView&lt;/SPAN&gt;.setOnStatusChangedListener(&lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;OnStatusChangedListener() {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808000;"&gt;@Override&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808000;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;public void &lt;/SPAN&gt;onStatusChanged(Object source, STATUS status) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="color: #808080; font-style: italic;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;if&lt;/SPAN&gt;(source &lt;SPAN style="color: #000080; font-weight: bold;"&gt;instanceof &lt;/SPAN&gt;RasterLayer &amp;amp;&amp;amp; STATUS.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;LAYER_LOADED &lt;/SPAN&gt;== status){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView&lt;/SPAN&gt;.setExtent(&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;rasterLayer.getExtent()&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;2&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2015 05:59:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/rasterlayer-in-android-sdk/m-p/152489#M1092</guid>
      <dc:creator>EricBader</dc:creator>
      <dc:date>2015-07-24T05:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: RasterLayer in android sdk</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/rasterlayer-in-android-sdk/m-p/152490#M1093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In fact I am using the listener at the moment, and it does not work as expectd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) I can not see the map unless I zoom in the map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) The map will disappear once the map scale is smaller than a certain value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Jul 2015 00:05:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/rasterlayer-in-android-sdk/m-p/152490#M1093</guid>
      <dc:creator>kkkk1</dc:creator>
      <dc:date>2015-07-26T00:05:41Z</dc:date>
    </item>
  </channel>
</rss>

