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;
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.
Hi Kelly, As Laura mentioned, the issue is with points. The example you have given will not work for points.
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.
Ok thank you!
Thank you!
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?
If we select multiple points, the highlight behavior is different from the polygon.
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
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"
});
Setting "color" to [0,0,0,0] didn't work, but setting "size" to 0 did. Thanks! Default behavior is good enough for me.