Runtime 100.1 qml PictureMarkerSymbol as selection symbol

01-27-2018 03:23 AM
New Contributor

Hi all,

I'm migrating an app from 10.2.6 runtime version to 100.1.

Core question, I'm having some troubles using PictureMarkerSymbol as Graphic selection symbol in a GraphicsLayer

In 10.2.6 to select a Graphic object, in onFindGraphicsComplete, I used


and to assign it a new selection symbol I set

GraphicsLayer {
   id: merchantLayer

       selectionSymbol: defaultSelectionSymbo //this is a PictureMarkerSymbol!!!

It works fine.
Now, with 100.1, there's no more  GraphicsOverlay.selectionSymbol. There's only selectionColor.

I'm trying this way, select the Graphics like this

onIdentifyGraphicsOverlayStatusChanged: {[0].selected=true;

and set onSelectedChanged() in each Graphics object to intercept the selection status change
and perform the substitution of Graphic renderer.
Before moving on, do you think this is the right solution?
If it is so, my Graphics object is dinamically built like this
for (var i = 0; i<features.length; i++){
   var merchantGeometry = ArcGISRuntimeEnvironment.createObject("Point",  {"json": features[i].geometry});
   var attributes = features[i].attributes;
   var merchantGraphic = ArcGISRuntimeEnvironment.createObject("Graphic", { geometry: merchantGeometry })
   merchantGraphic.attributes.attributesJson = attributes;
   //HELP! Here I'm not able to set onSelectedChanged
How can I do somethig like this qml:
    merchantGraphic.onSelectedChanged: {

       console.log ("selected status changed. Change graphic's renderer")  

Minor question, the AppStudio 2.1.19 downloaded doesn't have the latest runtime 100.2, do I have to install something else?

THANK YOU for your attention.


0 Kudos
2 Replies
Regular Contributor II

Hi Massimiliano:

I hope I'm understanding what you are trying to do.

Before moving on, do you think this is the right solution?
 Answer: Yes.

If you're trying to find out what is currently selected on the GraphicsOverlay and then act on it, you can get a list of the selected graphics through the  selectedGraphics property. Then you can get the graphic and change its symbol. Do I understand correctly?

Regarding AppStudio, it hasn't released on top of 100.2 just yet. It will.

0 Kudos
New Contributor

Hi Eric,


thank you. The issue is not how to get selected Graphics but how to manage the change of selection status.

I'm trying this way but something goes wrong emitting or catching the signal selectedChanged.

I defined my Graphics as

var merchantGraphic = ArcGISRuntimeEnvironment.crateObject("Graphic", { 
   geometry: merchantGeometry, 
   symbol: merchantSymbol, 

and I selected it inside

onIdentifyGraphicsOverlayStatusChanged: {
   if (identifyGraphicsOverlayStatus === Enums.TaskStatusCompleted) {
      if ( > 0) {
      var identifiedGraphic =[0];

Why the onSelectedChanged: myChangeSymbol()  is not called when I set  identifiedGraphic.selected=true; ?

Even force it  identifiedGraphic.selectedChanged();




0 Kudos