<?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 Callback listener when certain layers come into view in MapView in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/callback-listener-when-certain-layers-come-into/m-p/471682#M3220</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 was looking for some form of callback when a certain layer is in view on the mapView (i.e the user pans to the place where the layer is). However, I could not find something similar in the API reference. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The motivation behind such a callback is to dynamically change the UI based on whats being shown on the mapView. I would like to enquire if such a thing exists, and did I miss out something. Otherwise, any advice on how to go about implementing it will be greatly appreciated &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Dec 2013 09:29:54 GMT</pubDate>
    <dc:creator>SimKern_Cheh</dc:creator>
    <dc:date>2013-12-05T09:29:54Z</dc:date>
    <item>
      <title>Callback listener when certain layers come into view in MapView</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/callback-listener-when-certain-layers-come-into/m-p/471682#M3220</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 was looking for some form of callback when a certain layer is in view on the mapView (i.e the user pans to the place where the layer is). However, I could not find something similar in the API reference. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The motivation behind such a callback is to dynamically change the UI based on whats being shown on the mapView. I would like to enquire if such a thing exists, and did I miss out something. Otherwise, any advice on how to go about implementing it will be greatly appreciated &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Dec 2013 09:29:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/callback-listener-when-certain-layers-come-into/m-p/471682#M3220</guid>
      <dc:creator>SimKern_Cheh</dc:creator>
      <dc:date>2013-12-05T09:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: Callback listener when certain layers come into view in MapView</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/callback-listener-when-certain-layers-come-into/m-p/471683#M3221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I don't believe anything like that is currently baked into the API, but the building blocks for it are certainly in place. There is an isVisible() method that you can use to know when a layer is visible, but I haven't done much testing to know if this value updates automatically based on MapView scale changes or if it only updates based on programmatic changes. You'd have to test to see what gets returned with a layer is set to visible but outside of its scale range. That said, I doubt that it considers the extent at all (but I could be wrong). For that, you have a couple methods you can use. For an ArcGISDynamicMapServiceLayer, you'll want to look at getMapServiceInfo(). The MapServiceInfo object contains information about the extent of the service as well as the min and max scale at which it is visible. For an ArcGISFeatureLayer the corresponding method is getLayerServiceInfo(), which returns a LayerServiceInfo object with similar properties.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;On your MapView you can then set pan and zoom listeners to iterate through your layers to see which ones are visible using a combination of isVisible() and the properties from your MapServiceInfo/LayerServiceInfo objects.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Dec 2013 13:05:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/callback-listener-when-certain-layers-come-into/m-p/471683#M3221</guid>
      <dc:creator>JasonKnisley</dc:creator>
      <dc:date>2013-12-09T13:05:11Z</dc:date>
    </item>
  </channel>
</rss>

