JS API 3.25 Feature layer click event doesn't fire if fill style set to 'No Color'

08-14-2018 02:06 PM
New Contributor II

When a feature layer polygon fill is set to "No Color" in a webmap, the onClick event no longer fires inside the features. It will continue to work when a border path is clicked on, and the popup continues to work just fine, but the event does not fire when the user clicks inside a feature.

No idea why this is, but it seems like a bug. Workaround has been to set the fill to 100% transparent.

See fiddle for example (make sure you click both inside a feature and right on the edge path of a feature to see different behavior)


Tags (1)
0 Kudos
1 Reply
MVP Esteemed Contributor


   That behavior is nothing new to the 3.25 API I test back to 3.20 and it has just been that way. You have already discovered the proper way to get the click to work which is to set the fill color to 0 on the alpha channel.

0 Kudos