<?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: AGSRenderer subclass in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsrenderer-subclass/m-p/329102#M2862</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;... Does the layer ask its renderer for a visual representation of each &lt;SPAN style="font-family:Courier New;"&gt;AGSGraphic&lt;/SPAN&gt;? Does the visual representation of a graphic always end up being a swatch/image?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, and yes. &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;AGSGraphic&lt;/SPAN&gt;&lt;SPAN&gt; and &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;AGSGraphicsLayer&lt;/SPAN&gt;&lt;SPAN&gt; are designed around representing and interacting with discrete objects/geometries. If I understand your desired workflow correctly, you want to switch from discrete graphics to a density representation at a certain scale. You should be able to accomplish this by having two services; one feature service that returns the discrete graphics and one dynamic or tiled service that returns the density map. You can switch between displaying one or the other once you cross your scale threshold. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You might also explore clustering algorithms. I've poked around with writing a k-means clustering kit for the ArcGIS Runtime SDK. &lt;/SPAN&gt;&lt;A href="http://revolver.be/blog/mapkit-clustering-with-ios/"&gt;This clustering library&lt;/A&gt;&lt;SPAN&gt; also has a good example of a more basic algorithm that could be ported over fairly easily.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Mar 2013 16:58:36 GMT</pubDate>
    <dc:creator>DanaMaher</dc:creator>
    <dc:date>2013-03-14T16:58:36Z</dc:date>
    <item>
      <title>AGSRenderer subclass</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsrenderer-subclass/m-p/329101#M2861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have an &lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;"&gt;AGSGraphicsLayer&lt;/SPAN&gt;&lt;SPAN&gt; that currently uses &lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;"&gt;AGSClassBreaksRenderer&lt;/SPAN&gt;&lt;SPAN&gt;. All data has point geometry, and I am using &lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;"&gt;AGSSimpleMarkerSymbol&lt;/SPAN&gt;&lt;SPAN&gt; for each class break. This is quite nice when zoomed in sufficiently close, but I would like to be able to have another renderer that can visualize the graphics as a continuous gradient when the markers would overlap and lose distinction.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I expected to be able to make a subclass of &lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;"&gt;AGSRenderer&lt;/SPAN&gt;&lt;SPAN&gt;, but it is not clear to me how &lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;"&gt;AGSGraphicsLayer&lt;/SPAN&gt;&lt;SPAN&gt; and &lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;"&gt;AGSRenderer&lt;/SPAN&gt;&lt;SPAN&gt; interact to perform the rendering. Does the layer ask its renderer for a visual representation of each &lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;"&gt;AGSGraphic&lt;/SPAN&gt;&lt;SPAN&gt;? Does the visual representation of a graphic always end up being a swatch/image?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 13:02:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsrenderer-subclass/m-p/329101#M2861</guid>
      <dc:creator>PatrickHartling</dc:creator>
      <dc:date>2013-03-14T13:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: AGSRenderer subclass</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsrenderer-subclass/m-p/329102#M2862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;... Does the layer ask its renderer for a visual representation of each &lt;SPAN style="font-family:Courier New;"&gt;AGSGraphic&lt;/SPAN&gt;? Does the visual representation of a graphic always end up being a swatch/image?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, and yes. &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;AGSGraphic&lt;/SPAN&gt;&lt;SPAN&gt; and &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;AGSGraphicsLayer&lt;/SPAN&gt;&lt;SPAN&gt; are designed around representing and interacting with discrete objects/geometries. If I understand your desired workflow correctly, you want to switch from discrete graphics to a density representation at a certain scale. You should be able to accomplish this by having two services; one feature service that returns the discrete graphics and one dynamic or tiled service that returns the density map. You can switch between displaying one or the other once you cross your scale threshold. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You might also explore clustering algorithms. I've poked around with writing a k-means clustering kit for the ArcGIS Runtime SDK. &lt;/SPAN&gt;&lt;A href="http://revolver.be/blog/mapkit-clustering-with-ios/"&gt;This clustering library&lt;/A&gt;&lt;SPAN&gt; also has a good example of a more basic algorithm that could be ported over fairly easily.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 16:58:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsrenderer-subclass/m-p/329102#M2862</guid>
      <dc:creator>DanaMaher</dc:creator>
      <dc:date>2013-03-14T16:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: AGSRenderer subclass</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsrenderer-subclass/m-p/329103#M2863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;If I understand your desired workflow correctly, you want to switch from discrete graphics to a density representation at a certain scale.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Correct.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You should be able to accomplish this by having two services; one feature service that returns the discrete graphics and one dynamic or tiled service that returns the density map. You can switch between displaying one or the other once you cross your scale threshold.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The wrinkle here is that I am receiving the data from an external source as it is read from various sensors. It is not coming from ArcGIS Server or from any mapping service. It sounds as though I need a custom subclass of &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;AGSDynamicLayer&lt;/SPAN&gt;&lt;SPAN&gt; that renders the density representation one way or another. Is that reasonable?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You might also explore clustering algorithms. I've poked around with writing a k-means clustering kit for the ArcGIS Runtime SDK. &lt;A href="http://revolver.be/blog/mapkit-clustering-with-ios/"&gt;This clustering library&lt;/A&gt; also has a good example of a more basic algorithm that could be ported over fairly easily.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the tip. I am looking into it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Mar 2013 12:53:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsrenderer-subclass/m-p/329103#M2863</guid>
      <dc:creator>PatrickHartling</dc:creator>
      <dc:date>2013-03-18T12:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: AGSRenderer subclass</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsrenderer-subclass/m-p/329104#M2864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;The wrinkle here is that I am receiving the data from an external source as it is read from various sensors. It is not coming from ArcGIS Server or from any mapping service. It sounds as though I need a custom subclass of &lt;SPAN style="font-style:italic;"&gt;AGSDynamicLayer&lt;/SPAN&gt; that renders the density representation one way or another. Is that reasonable?&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Interesting. To my knowledge, the various ArcGIS Runtime SDKs leave rendering of actual map tiles to backing map services. Only discreet geometries/graphics are rendered client-side. So, if not for your custom service, it would seem like the &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;AGSFeatureLayer&lt;/SPAN&gt;&lt;SPAN&gt; / &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;AGSDynamicMapServiceLayer&lt;/SPAN&gt;&lt;SPAN&gt; switching would be the way to go.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the 2.3 SDK, where layers were rendered within a hierarchy of &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;UIViews&lt;/SPAN&gt;&lt;SPAN&gt; inside &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;AGSMapView&lt;/SPAN&gt;&lt;SPAN&gt;, I have a hunch that you could:&lt;/SPAN&gt;&lt;BR /&gt;&lt;OL&gt;&lt;BR /&gt;&lt;LI&gt;Subclass &lt;SPAN style="font-style:italic;"&gt;AGSDynamicLayer&lt;/SPAN&gt;&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Override the drawing code for the &lt;SPAN style="font-style:italic;"&gt;UILayer&lt;/SPAN&gt; associated with the &lt;SPAN style="font-style:italic;"&gt;UIView&lt;/SPAN&gt; that represents the &lt;SPAN style="font-style:italic;"&gt;AGSDynamicLayer&lt;/SPAN&gt; in the &lt;SPAN style="font-style:italic;"&gt;AGSMapView&lt;/SPAN&gt;.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Write your own tile image generator (a lot of work!) to perform the drawing in the overridden &lt;SPAN style="font-style:italic;"&gt;UILayer&lt;/SPAN&gt; from 2).&lt;/LI&gt;&lt;BR /&gt;&lt;/OL&gt;&lt;SPAN&gt;This would involve use of undocumented API's and would probably be difficult to perfect since the &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;AGSMapView&lt;/SPAN&gt;&lt;SPAN&gt; does a lot of resizing of its internal components that you are not able to access or override. You would have to basically work with the private methods/components you figure out and around the ones you don't know and/or cannot override. It might be functional, but it will probably be a messy hack behind the scenes. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Unfortunately, with the switch to OpenGLES rendering in 10.1.1, access to the individual components of an &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;AGSMapView&lt;/SPAN&gt;&lt;SPAN&gt; is no longer possible; everything is being rendered into an OpenGLES window. The ESRI devs will obviously know more than I do, but I do have some experience with the SDK.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My two cents is that the subclass you are thinking of will have to work against some of the basic conventions/architectural choices of the SDK and that you want to either:&lt;/SPAN&gt;&lt;BR /&gt;&lt;OL&gt;&lt;BR /&gt;&lt;LI&gt;Figure out a clustering algorithm that will allow you to represent graphics in aggregate at larger scales. This does not get you a true density map but will allow the user to view clusters of graphics at larger scales. &lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Figure out a way to feed your external map service into an ESRI service. Assuming, of course, that you have the license to set up and use such a service.&lt;/LI&gt;&lt;BR /&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Mar 2013 19:17:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsrenderer-subclass/m-p/329104#M2864</guid>
      <dc:creator>DanaMaher</dc:creator>
      <dc:date>2013-03-18T19:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: AGSRenderer subclass</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsrenderer-subclass/m-p/329105#M2865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;My two cents is that the subclass you are thinking of will have to work against some of the basic conventions/architectural choices of the SDK and that you want to either:&lt;BR /&gt;&lt;OL&gt;&lt;BR /&gt;&lt;LI&gt;Figure out a clustering algorithm that will allow you to represent graphics in aggregate at larger scales. This does not get you a true density map but will allow the user to view clusters of graphics at larger scales. &lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Figure out a way to feed your external map service into an ESRI service. Assuming, of course, that you have the license to set up and use such a service.&lt;/LI&gt;&lt;BR /&gt;&lt;/OL&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What I have tried thus far does seem to be going against the grain. My proof of concept uses an instance of &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;CALayer&lt;/SPAN&gt;&lt;SPAN&gt; that I create and add as a sub-layer of the &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;CAEAGLLayer&lt;/SPAN&gt;&lt;SPAN&gt; used by &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;AGSMapView&lt;/SPAN&gt;&lt;SPAN&gt;. The behavior is quite poor due to the high latency on state change notifications from the &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;AGSMapView&lt;/SPAN&gt;&lt;SPAN&gt; object. My custom layer always lags way behind during panning and zooming. My real goal is to use an OpenGL texture to provide the visualization, but that would still have the same zooming and panning problems that I have with my trivial &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;CALayer&lt;/SPAN&gt;&lt;SPAN&gt; usage. I get the feeling that some sort of low level drawing hook into the &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;CAEAGLLayer&lt;/SPAN&gt;&lt;SPAN&gt; of the map view is what I would need to get the best results, but I do not see a way to make that happen.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Mar 2013 20:49:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsrenderer-subclass/m-p/329105#M2865</guid>
      <dc:creator>PatrickHartling</dc:creator>
      <dc:date>2013-03-18T20:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: AGSRenderer subclass</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsrenderer-subclass/m-p/329106#M2866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;What I have tried thus far does seem to be going against the grain. My proof of concept uses an instance of &lt;SPAN style="font-style:italic;"&gt;CALayer&lt;/SPAN&gt; that I create and add as a sub-layer of the &lt;SPAN style="font-style:italic;"&gt;CAEAGLLayer&lt;/SPAN&gt; used by &lt;SPAN style="font-style:italic;"&gt;AGSMapView&lt;/SPAN&gt;. The behavior is quite poor due to the high latency on state change notifications from the &lt;SPAN style="font-style:italic;"&gt;AGSMapView&lt;/SPAN&gt; object. My custom layer always lags way behind during panning and zooming. My real goal is to use an OpenGL texture to provide the visualization, but that would still have the same zooming and panning problems that I have with my trivial &lt;SPAN style="font-style:italic;"&gt;CALayer&lt;/SPAN&gt; usage. I get the feeling that some sort of low level drawing hook into the &lt;SPAN style="font-style:italic;"&gt;CAEAGLLayer&lt;/SPAN&gt; of the map view is what I would need to get the best results, but I do not see a way to make that happen.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Yeah, that is the same limitation I ran into playing with the 2.3 SDK. I had some luck making the custom layer (&lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;UIView&lt;/SPAN&gt;&lt;SPAN&gt; in my case) transparent between an extent changing user gesture and the eventual &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;mapViewDid_____&lt;/SPAN&gt;&lt;SPAN&gt; notification. However, this looked pretty awful; it's been years since your average web/mobile map had to suspend drawing while changing extent and there was sometimes still a moment of the render for the previous extent showing up.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Mar 2013 15:01:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsrenderer-subclass/m-p/329106#M2866</guid>
      <dc:creator>DanaMaher</dc:creator>
      <dc:date>2013-03-19T15:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: AGSRenderer subclass</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsrenderer-subclass/m-p/329107#M2867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think I am pretty close to having this resolved. I had not looked closely enough at &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;AGSLayer(ForSubclassEyesOnly)&lt;/SPAN&gt;&lt;SPAN&gt; and &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;AGSDynamicLayer(ForSubclassEyesOnly)&lt;/SPAN&gt;&lt;SPAN&gt;. The rendering hook that I need is in the form of two methods in the latter category: &lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;"&gt;-requestImageWithWidth:height:envelope:timeExtent:&lt;/SPAN&gt;&lt;SPAN&gt; and &lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;"&gt;-setImageData:forEnvelope:&lt;/SPAN&gt;&lt;SPAN&gt;. The first will be sent to my &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;AGSDynamicLayer&lt;/SPAN&gt;&lt;SPAN&gt; subclass after I send &lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;"&gt;-layerDidLoad&lt;/SPAN&gt;&lt;SPAN&gt; to it. When there is new data to render, I send &lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;"&gt;-refresh&lt;/SPAN&gt;&lt;SPAN&gt; to my &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;AGSDynamicLayer&lt;/SPAN&gt;&lt;SPAN&gt; subclass, and the request method is invoked again.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am now at a point where I am focused on developing the algorithm that produces the image data that is the request response. Using &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;CALayer&lt;/SPAN&gt;&lt;SPAN&gt; was definitely never going to get me to that point. Thanks for the pointers and the feedback.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Mar 2013 15:10:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsrenderer-subclass/m-p/329107#M2867</guid>
      <dc:creator>PatrickHartling</dc:creator>
      <dc:date>2013-03-19T15:10:06Z</dc:date>
    </item>
  </channel>
</rss>

