<?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: Multicolor lines in Qt Maps SDK Questions</title>
    <link>https://community.esri.com/t5/qt-maps-sdk-questions/multicolor-lines/m-p/1067050#M4243</link>
    <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/368809"&gt;@KennSebesta&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Another option would be a ClassBreaksRenderer. Here's an example where we use that.&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/arcgis-runtime-samples-qt/tree/0d40b7f2793f220af8355374115a1036db582c39/ArcGISRuntimeSDKQt_QMLSamples/Layers/ChangeSublayerRenderer" target="_blank"&gt;https://github.com/Esri/arcgis-runtime-samples-qt/tree/0d40b7f2793f220af8355374115a1036db582c39/ArcGISRuntimeSDKQt_QMLSamples/Layers/ChangeSublayerRenderer&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You could probably write a loop to create all the class breaks (all 100 or however many you need), along with the symbol and color you want for each.&lt;/P&gt;&lt;P&gt;For that many distinct values, ClassBreaksRenderer is likely more suitable and easier to work with.&lt;/P&gt;&lt;P&gt;One thing to keep in mind is that with this or the previous solution, you will need to break apart your breadcrumbs polyline into multiple sections with rather than treating it is a single feature/graphic. You'd need to weigh that with your needs.&lt;/P&gt;</description>
    <pubDate>Thu, 10 Jun 2021 19:05:08 GMT</pubDate>
    <dc:creator>JamesBallard1</dc:creator>
    <dc:date>2021-06-10T19:05:08Z</dc:date>
    <item>
      <title>Multicolor lines</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/multicolor-lines/m-p/1065592#M4218</link>
      <description>&lt;P&gt;I would like to draw the user's track on the map, and use a color scale to represent a third axis of data. For instance, in the below, this is a breadcrumb track where the color could represent speed along the ground.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Rfb10fb1e75b21887730482cc19ec827c.jpeg" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/15314i8A86CA76DD114195/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Rfb10fb1e75b21887730482cc19ec827c.jpeg" alt="Rfb10fb1e75b21887730482cc19ec827c.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Others have &lt;A href="https://community.esri.com/t5/arcgis-runtime-sdk-for-net/multicolor-graphic/m-p/506067" target="_self"&gt;asked&lt;/A&gt; about &lt;A href="https://community.esri.com/t5/arcgis-runtime-sdk-for-ios/multicolored-graphics-sketch-layer/m-p/391787" target="_self"&gt;something similar,&lt;/A&gt; but so far there's no canonical documentation that I have found for multi-color polylines or polygons. I have looked through the SDK documentation and it seems that since LineSymbol is only inherited by SimpleLineSymbol this multi-color geometry might be currently unsupported.&lt;/P&gt;&lt;P&gt;I suspect that this might be doable by using a ListModel of some sort, e.g.&amp;nbsp;&lt;A href="https://developers.arcgis.com/qt/qml/api-reference/qml-esri-arcgisruntime-graphiclistmodel.html" target="_self"&gt;GraphicListModel&lt;/A&gt; or &lt;A href="https://developers.arcgis.com/qt/qml/api-reference/qml-esri-arcgisruntime-graphicsoverlaylistmodel.html" target="_self"&gt;GraphicsOverlayListModel&lt;/A&gt;, but I worry about the impact on system resources. (Typically, a large array of data structures is orders of magnitude less performant than a single structure containing a large data array.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jun 2021 12:56:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/multicolor-lines/m-p/1065592#M4218</guid>
      <dc:creator>KennSebesta</dc:creator>
      <dc:date>2021-06-07T12:56:48Z</dc:date>
    </item>
    <item>
      <title>Re: Multicolor lines</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/multicolor-lines/m-p/1066085#M4224</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/368809"&gt;@KennSebesta&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;There is a way to achieve this with a few caveats. First, there is no multicolor symbolization in Runtime right now. That being said, I think this solution would be suitable.&lt;/P&gt;&lt;P&gt;You can have multiple GraphicsOverlays in each GraphicsOverlayListModel. So for example, you could add 3 GraphicsOverlays; one for each speed and each with their own renderer. With this approach overlay 1 could be slow (green), overlay 2 could be moderate (blue) and overlay 3 could be fast (red). Then, when processing each new segment of the breadcrumbs polyline, you could determine which overlay to add it to.&lt;/P&gt;&lt;P&gt;This may require some extra data structures. For example, you'd need to keep track of each segment rather than using a PolylineBuilder to keep adding onto with each new track.&lt;/P&gt;&lt;P&gt;Let us know if that works.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 17:01:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/multicolor-lines/m-p/1066085#M4224</guid>
      <dc:creator>JamesBallard1</dc:creator>
      <dc:date>2021-06-08T17:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: Multicolor lines</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/multicolor-lines/m-p/1066931#M4238</link>
      <description>&lt;P&gt;I haven't had a chance to try this yet, but I see it has some potential as a workaround. The immediate limitations I see are 1) needing ~100 bins/buckets-- not just 3-- in order to have a seamless color transition and 2) the need to re-bin across the entire dataset in case the color end-points are changed. But in a pinch, it should work.&lt;/P&gt;&lt;P&gt;Ideally, something like &lt;A href="https://developers.arcgis.com/qt/qml/api-reference/qml-esri-arcgisruntime-heatmaprenderer.html" target="_self"&gt;HeatmapRenderer&lt;/A&gt; would exist for lines. It would be far simpler to be able to update color endpoints and have the renderer take care of the work.&lt;/P&gt;&lt;P&gt;I will try to schedule some time to implement the workaround. There's enough complexity that I'll want to write a decent API so that the end programmer interacts with it like s/he would see HeatmapRenderer.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 15:20:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/multicolor-lines/m-p/1066931#M4238</guid>
      <dc:creator>KennSebesta</dc:creator>
      <dc:date>2021-06-10T15:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: Multicolor lines</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/multicolor-lines/m-p/1067050#M4243</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/368809"&gt;@KennSebesta&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Another option would be a ClassBreaksRenderer. Here's an example where we use that.&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/arcgis-runtime-samples-qt/tree/0d40b7f2793f220af8355374115a1036db582c39/ArcGISRuntimeSDKQt_QMLSamples/Layers/ChangeSublayerRenderer" target="_blank"&gt;https://github.com/Esri/arcgis-runtime-samples-qt/tree/0d40b7f2793f220af8355374115a1036db582c39/ArcGISRuntimeSDKQt_QMLSamples/Layers/ChangeSublayerRenderer&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You could probably write a loop to create all the class breaks (all 100 or however many you need), along with the symbol and color you want for each.&lt;/P&gt;&lt;P&gt;For that many distinct values, ClassBreaksRenderer is likely more suitable and easier to work with.&lt;/P&gt;&lt;P&gt;One thing to keep in mind is that with this or the previous solution, you will need to break apart your breadcrumbs polyline into multiple sections with rather than treating it is a single feature/graphic. You'd need to weigh that with your needs.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 19:05:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/multicolor-lines/m-p/1067050#M4243</guid>
      <dc:creator>JamesBallard1</dc:creator>
      <dc:date>2021-06-10T19:05:08Z</dc:date>
    </item>
  </channel>
</rss>

