Why are the FillSymbol and MarkerSymbol results different in a Feature Layer?

08-14-2019 01:00 PM
New Contributor II


I've been working a lot lately with combined renderers on Feature Layers that use both point symbols and polygon outlines, and noticed several scenarios where the point symbol ends up outside of the polygon, as seen here:

While i'm not expecting the point symbol to be directly in the center necessarily, I'd expect it to lie somewhere inside of the polygon. I've attached the exact demo code I've used to generate this. It's also available as a fiddle here: https://jsfiddle.net/8u7d3wgo/

Any suggestions for how to fix this? I'm restricted to using the 3.x JS API.



0 Kudos
2 Replies
MVP Esteemed Contributor

Patrick this is a bug with the polygons getCentroid function. If you use the getCentroid function and place a graphic for your polygon it places it in the exact spot the renderer does. This is something you will need to report to esri tech support as GeoNet is not a proper bug reporting channel.

New Contributor II

Thanks Robert. I've opened a case with Esri and will proceed there. Good to know it wasn't just user error.

0 Kudos