map.infoWindow marker symbol does not show up in JSAPI 3.14

6121
24
09-28-2015 12:54 PM
BillyYancey
New Contributor II

I switched my JSAPI version to 3.14 and now, when I have point features selected, the symbol does not show up. It works fine if I only switch back to 3.12. It also works fine for the line features.

Interestingly enough, I could not find any of the samples in which point features are highlighted when popups are used on a point features identify style tool.

Here is the current symbol setup in case it it helps:

selColor = new esri.Color([0, 255, 255, 0.6]);
selLine = new esri.symbol.CartographicLineSymbol(esri.symbol.CartographicLineSymbol.STYLE_SOLID, selColor, 10, esri.symbol.CartographicLineSymbol.CAP_ROUND, esri.symbol.CartographicLineSymbol.JOIN_ROUND);
selMarker = new esri.symbol.SimpleMarkerSymbol(esri.symbol.SimpleMarkerSymbol.STYLE_SQUARE, 20, selLine, selColor);
mainMap.infoWindow.lineSymbol = selLine;
mainMap.infoWindow.markerSymbol = selMarker;
Tags (2)
0 Kudos
24 Replies
sreeharikottoormadam
New Contributor III

OK. But it worked for me.

var symbol = new SimpleMarkerSymbol({

              "color": [0,0,0,0],

              "size": 12,

              "angle": -30,

              "xoffset": 0,

              "yoffset": 0,

              "type": "esriSMS",

              "style": "esriSMSCircle"

          });

0 Kudos
LauraMiles1
Occasional Contributor III

I see, you took off the outline

            var symbol = new SimpleMarkerSymbol({

              "color": [0,0,0,1],

              "size": 12,

              "angle": -30,

              "xoffset": 0,

              "yoffset": 0,

              "type": "esriSMS",

              "style": "esriSMSCircle",

              "outline": {

                "color": [255,0,191],

                "width": 0,

                "type": "esriSLS",

                "style": "esriSLSSolid"

              }

          });

0 Kudos
sreeharikottoormadam
New Contributor III

Yes and please see change in SimpleMarkerSymbol property "color" .

     var symbol = new SimpleMarkerSymbol({

             "color": [0,0,0,1],

              "color": [0,0,0,0] ,

              "size": 12,

              "angle": -30,

              "xoffset": 0,

              "yoffset": 0,

              "type": "esriSMS",

              "style": "esriSMSCircle",

              "outline": {

                "color": [255,0,191],

                "width": 0,

                "type": "esriSLS",

                "style": "esriSLSSolid"

              }

          });

0 Kudos
JamieKelly1
Occasional Contributor

I'm using Javascript API 3.18 and I ran into the same problem with points not getting highlighted with a selection symbol.  To get around the problem, this is what I did:

  Basically the symbol is undefined for points so I set the symbol and refresh the graphics when the popup is shown and when the arrows are used to change selection.

var popup = new Popup({}, domConstruct.create("div"));
on(popup, "SelectionChange", function(){
    if(!map.graphics.graphics[0].symbol){
        map.graphics.graphics[0].symbol = map.infoWindow.markerSymbol;
        map.graphics.refresh();
    }
});
on(popup, "Show", function(){
    if(!map.graphics.graphics[0].symbol){
        map.graphics.graphics[0].symbol = map.infoWindow.markerSymbol;
        map.graphics.refresh();
    }
});

BryanBaker
Occasional Contributor

I used a similar approach to Jamie's to set the marker symbol on the graphic. I did add checks to compare the infowindow.features to the map.graphics to ensure that it's setting the symbol for the right graphic, just in case there are other graphics in the map's collection.

Based on this, I don't see how this is not a bug in the API. The infowindow sets the highlight symbol for lines and polygons, but not for points, even though it did in previous versions. Sure, the developers may have changed how they handle the highlighting, but it's not an excuse for dropping functionality that could easily be persisted.