jon.g@39dn.com

How do I display a legend symbol as a regular Qt Quick image (outside of a view/model/delegate)?

Discussion created by jon.g@39dn.com on Mar 17, 2017
Latest reply on Mar 17, 2017 by LSmallwood-esristaff

I'm using version 100.0, and basing my code off of Show legend—ArcGIS Runtime SDK for Qt | ArcGIS for Developers 

 

I get that the file for each legendInfo's image is being created by the LegendInfoListModel, but is there any way I can get that image data and turn it into an image myself without relying on this system?  I can see the data in the responses from the server, but I don't know how to access it through your SDK. 

 

 

Currently, I have to generate a view/model/delegate for every layer, and keep them in existence while capturing the symbolUrl from the delegate itself and exposing that to the rest of my application. This means in order to render a simple icon I have to have all that overhead instead of just a simple Image {} object, which is probably not a good idea on mobile. 

 

One possibility I can already think of is to manually send a request to the legend endpoint, retrieve the imageData strings, and render a qt quick image from that. Is that what I'm going to have to do?

Outcomes