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

6220
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
LauraMiles1
Occasional Contributor III

Hi Kelly, there's no issue with polygons highlighting - the polygons in my jsfiddle highlight too, it's only the points that seem not to.

0 Kudos
sreeharikottoormadam
New Contributor III

Hi Kelly, As Laura mentioned, the issue is with points. The example you have given will not work for points.

0 Kudos
KellyHutchins
Esri Frequent Contributor

Based on a quick look this looks like a bug. Your best bet is to submit this as an issue to Esri Support so they can evaluate the problem and log a bug.

Edit: I spoke to the dev team and this change is due to a behavioral change in how popup works with features rather than a bug. In order to have point selection appear you'll need to add a graphic to a graphics layer and manage the selection. Here's a link to an example showing how this works.

JS Bin - Collaborative JavaScript Debugging

LauraMiles1
Occasional Contributor III

Ok thank you!

0 Kudos
sreeharikottoormadam
New Contributor III


Thank you!

0 Kudos
LauraMiles1
Occasional Contributor III

Hi Kelly, thanks for this - it is working for me. But are they sure this is not a bug? What is the rationale for the default behavior being that polygons and lines highlight, but not points?

0 Kudos
sreeharikottoormadam
New Contributor III

If we select multiple points, the highlight behavior is different from the polygon.

0 Kudos
LauraMiles1
Occasional Contributor III

I agree the behavior is different - this seems like a workaround rather than the way the API is intended to function...when I added this code into my own map, I get both the custom highlight and something that looks like the default highlight (cyan color).

See it here Edit fiddle - JSFiddle

0 Kudos
sreeharikottoormadam
New Contributor III

Hi Laura,

Yes, I agreed with you and seems it is a bug. Try using this workaround. Set the alpha for the outline to 0. So we will get at least default behavior. I have tried this and working fine.

   var symbol = new SimpleMarkerSymbol({

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

              "size": 12,

              "angle": -30,

              "xoffset": 0,

              "yoffset": 0,

              "type": "esriSMS",

              "style": "esriSMSCircle"

          });

LauraMiles1
Occasional Contributor III

Setting "color" to [0,0,0,0] didn't work, but setting "size" to 0 did. Thanks! Default behavior is good enough for me.

0 Kudos