<?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 AddLayer outside OnCreate NOT working. BUG? in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/addlayer-outside-oncreate-not-working-bug/m-p/223454#M1454</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm experimenting a weird behaviour with map.addLayer() method and I'm not sure if it's a bug or I'm missing something.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The thing is that in some Android devices (i.e. Samsung Galaxy Ace) when I add layers to the map after the OnCreate method these layers are not showing in the map, but if I add the layers during the onCreate method, these layers are showing correctly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I could guess that you can only use the addLayer method on the OnCreate process, but it has no sense because as I say, this only happens in some Android devices... and that's why I'm not getting which is the exact problem. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;These are two examples about 2different ways of how I add the layers:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;map.removeAll(); &lt;BR /&gt;&lt;SPAN&gt;WMSLayer wms = new WMSLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://mapcache.icc.cat/map/bases/service" rel="nofollow" target="_blank"&gt;http://mapcache.icc.cat/map/bases/service&lt;/A&gt;&lt;SPAN&gt;?",SpatialReference.create(23031));&lt;/SPAN&gt;&lt;BR /&gt;map.addLayer(wms);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;or&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;baseLayer.setVisible(false);//I set to not visible the current layer added to the map&lt;BR /&gt;&lt;SPAN&gt;WMSLayer wms = new WMSLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://mapcache.icc.cat/map/bases/service" rel="nofollow" target="_blank"&gt;http://mapcache.icc.cat/map/bases/service&lt;/A&gt;&lt;SPAN&gt;?",SpatialReference.create(23031));&lt;/SPAN&gt;&lt;BR /&gt;map.addLayer(wms);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyone has noticed the same? Anyone from ESRI could try to reproduce the problem?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advanced,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 May 2013 08:41:05 GMT</pubDate>
    <dc:creator>JessicaSena</dc:creator>
    <dc:date>2013-05-13T08:41:05Z</dc:date>
    <item>
      <title>AddLayer outside OnCreate NOT working. BUG?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/addlayer-outside-oncreate-not-working-bug/m-p/223454#M1454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm experimenting a weird behaviour with map.addLayer() method and I'm not sure if it's a bug or I'm missing something.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The thing is that in some Android devices (i.e. Samsung Galaxy Ace) when I add layers to the map after the OnCreate method these layers are not showing in the map, but if I add the layers during the onCreate method, these layers are showing correctly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I could guess that you can only use the addLayer method on the OnCreate process, but it has no sense because as I say, this only happens in some Android devices... and that's why I'm not getting which is the exact problem. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;These are two examples about 2different ways of how I add the layers:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;map.removeAll(); &lt;BR /&gt;&lt;SPAN&gt;WMSLayer wms = new WMSLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://mapcache.icc.cat/map/bases/service" rel="nofollow" target="_blank"&gt;http://mapcache.icc.cat/map/bases/service&lt;/A&gt;&lt;SPAN&gt;?",SpatialReference.create(23031));&lt;/SPAN&gt;&lt;BR /&gt;map.addLayer(wms);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;or&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;baseLayer.setVisible(false);//I set to not visible the current layer added to the map&lt;BR /&gt;&lt;SPAN&gt;WMSLayer wms = new WMSLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://mapcache.icc.cat/map/bases/service" rel="nofollow" target="_blank"&gt;http://mapcache.icc.cat/map/bases/service&lt;/A&gt;&lt;SPAN&gt;?",SpatialReference.create(23031));&lt;/SPAN&gt;&lt;BR /&gt;map.addLayer(wms);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyone has noticed the same? Anyone from ESRI could try to reproduce the problem?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advanced,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 May 2013 08:41:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/addlayer-outside-oncreate-not-working-bug/m-p/223454#M1454</guid>
      <dc:creator>JessicaSena</dc:creator>
      <dc:date>2013-05-13T08:41:05Z</dc:date>
    </item>
  </channel>
</rss>

