<?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: Add TIF file in map by RasterLayer in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/add-tif-file-in-map-by-rasterlayer/m-p/1044066#M5461</link>
    <description>&lt;P&gt;my tif foried to deleted setLicense and got new error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2021-04-06 10:49:03.306 17747-17747/com.example.offlinemapdemo E/getMessage:: File error.&lt;/P&gt;&lt;P&gt;2021-04-06 10:49:03.306 17747-17747/com.example.offlinemapdemo E/getCause:: null&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my tif folder has 4 files：Shasta.tfw ；Shasta.tif ；&amp;nbsp;Shasta.tif.aux.xml ；Shasta.tif.ovr。&lt;/P&gt;&lt;P&gt;and my app has&amp;nbsp;&lt;SPAN&gt;permission to read the&amp;nbsp;local&amp;nbsp; files&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;May I ask where the problem may be？&lt;/P&gt;</description>
    <pubDate>Tue, 06 Apr 2021 02:56:47 GMT</pubDate>
    <dc:creator>zhenghanzhang</dc:creator>
    <dc:date>2021-04-06T02:56:47Z</dc:date>
    <item>
      <title>Add TIF file in map by RasterLayer</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/add-tif-file-in-map-by-rasterlayer/m-p/1043284#M5457</link>
      <description>&lt;PRE&gt;&lt;SPAN&gt;arcgis-android:100.10.0&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;code:&lt;/P&gt;&lt;PRE&gt;setContentView(&lt;SPAN&gt;R&lt;/SPAN&gt;.&lt;SPAN&gt;layout&lt;/SPAN&gt;.&lt;SPAN&gt;activity_main&lt;/SPAN&gt;);&lt;BR /&gt;&lt;SPAN&gt;// retrieve the MapView from layout&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;mMapView &lt;/SPAN&gt;= findViewById(&lt;SPAN&gt;R&lt;/SPAN&gt;.&lt;SPAN&gt;id&lt;/SPAN&gt;.&lt;SPAN&gt;mapview&lt;/SPAN&gt;);&lt;BR /&gt;&lt;SPAN&gt;// create a raster from a local raster file&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Raster raster &lt;/SPAN&gt;= &lt;SPAN&gt;new &lt;/SPAN&gt;Raster(&lt;SPAN&gt;Environment&lt;/SPAN&gt;.&lt;SPAN&gt;getExternalStorageDirectory&lt;/SPAN&gt;().getAbsolutePath() + &lt;SPAN&gt;"/tiffiles/raster-file/Shasta.tif"&lt;/SPAN&gt;);&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;// create a raster layer&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;final &lt;/SPAN&gt;&lt;SPAN&gt;RasterLayer rasterLayer &lt;/SPAN&gt;= &lt;SPAN&gt;new &lt;/SPAN&gt;RasterLayer(&lt;SPAN&gt;raster&lt;/SPAN&gt;);&lt;BR /&gt;&lt;SPAN&gt;// create a Map with imagery basemap&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;ArcGISMap map &lt;/SPAN&gt;= &lt;SPAN&gt;new &lt;/SPAN&gt;ArcGISMap(&lt;SPAN&gt;BasemapStyle&lt;/SPAN&gt;.&lt;SPAN&gt;ARCGIS_IMAGERY&lt;/SPAN&gt;);&lt;BR /&gt;&lt;SPAN&gt;// add the map to a map view&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;mMapView&lt;/SPAN&gt;.setMap(&lt;SPAN&gt;map&lt;/SPAN&gt;);&lt;BR /&gt;&lt;SPAN&gt;// add the raster as an operational layer&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;map&lt;/SPAN&gt;.getOperationalLayers().add(&lt;SPAN&gt;rasterLayer&lt;/SPAN&gt;);&lt;BR /&gt;&lt;SPAN&gt;// set viewpoint on the raster&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;rasterLayer&lt;/SPAN&gt;.addDoneLoadingListener(() -&amp;gt; &lt;SPAN&gt;mMapView&lt;/SPAN&gt;.setViewpointGeometryAsync(&lt;SPAN&gt;rasterLayer&lt;/SPAN&gt;.getFullExtent(), &lt;SPAN&gt;50&lt;/SPAN&gt;));&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;error:&lt;/P&gt;&lt;P&gt;java.lang.IllegalArgumentException: Parameter boundingGeometry must not be null&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 03:17:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/add-tif-file-in-map-by-rasterlayer/m-p/1043284#M5457</guid>
      <dc:creator>zhenghanzhang</dc:creator>
      <dc:date>2021-04-02T03:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: Add TIF file in map by RasterLayer</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/add-tif-file-in-map-by-rasterlayer/m-p/1043699#M5459</link>
      <description>&lt;P&gt;I suspect that this is failing as there was an issue loading the raster.&amp;nbsp; The code above could be improved by checking the load status of the file before setting the view point.&amp;nbsp; In my own app, I did the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;      // set viewpoint on the raster
      rasterLayer.addDoneLoadingListener(() -&amp;gt; {
        // check to see if the file loaded
        if (rasterLayer.getLoadStatus() == LoadStatus.LOADED) {
          mapView.setViewpointGeometryAsync(rasterLayer.getFullExtent(), 150);
        } else {
          // it didn't load so let's examine the load errors outputting results from these methods:
          rasterLayer.getLoadError().getMessage();
          rasterLayer.getLoadError().getCause();
        }
      });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So output the errors to Logcat and see what is happening.&lt;/P&gt;&lt;P&gt;It is possible you don't have permission to read the files from your local storage...&lt;/P&gt;&lt;P&gt;Let me know if this helps.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;</description>
      <pubDate>Sun, 04 Apr 2021 18:52:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/add-tif-file-in-map-by-rasterlayer/m-p/1043699#M5459</guid>
      <dc:creator>MarkBaird</dc:creator>
      <dc:date>2021-04-04T18:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: Add TIF file in map by RasterLayer</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/add-tif-file-in-map-by-rasterlayer/m-p/1044045#M5460</link>
      <description>&lt;P&gt;Thanks for reply my question！I logcat the message，it shows&amp;nbsp;E/getMessage:: Unlicensed feature.&lt;/P&gt;&lt;P&gt;As i think i need check my license&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 01:04:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/add-tif-file-in-map-by-rasterlayer/m-p/1044045#M5460</guid>
      <dc:creator>zhenghanzhang</dc:creator>
      <dc:date>2021-04-06T01:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: Add TIF file in map by RasterLayer</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/add-tif-file-in-map-by-rasterlayer/m-p/1044066#M5461</link>
      <description>&lt;P&gt;my tif foried to deleted setLicense and got new error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2021-04-06 10:49:03.306 17747-17747/com.example.offlinemapdemo E/getMessage:: File error.&lt;/P&gt;&lt;P&gt;2021-04-06 10:49:03.306 17747-17747/com.example.offlinemapdemo E/getCause:: null&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my tif folder has 4 files：Shasta.tfw ；Shasta.tif ；&amp;nbsp;Shasta.tif.aux.xml ；Shasta.tif.ovr。&lt;/P&gt;&lt;P&gt;and my app has&amp;nbsp;&lt;SPAN&gt;permission to read the&amp;nbsp;local&amp;nbsp; files&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;May I ask where the problem may be？&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 02:56:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/add-tif-file-in-map-by-rasterlayer/m-p/1044066#M5461</guid>
      <dc:creator>zhenghanzhang</dc:creator>
      <dc:date>2021-04-06T02:56:47Z</dc:date>
    </item>
  </channel>
</rss>

