4.10 Symbol Offset Visualization Issue

03-12-2019 10:17 AM
New Contributor II

I am working with PictureMarkerSymbols and came across a visualization issue of the symbols when certain x and y offsets are used.

x offset > 179 & y = 0
x offest < -181 & y = 0
y offset > 181 & x = 0
y offset < -179 & x = 0

I created a Pen using MarkerSymbols that outlines the cases above: Symbol Offset ArcGIS JS 4.10 Bug 

I started playing around with combinations of x and y's but figured the example would be enough for the JS team to start taking a look at. I noticed in the 4.10 release notes there were some bug fixes that could be related to the issue I'm having, but I'm not sure. Let me know if your team is already aware of the issue or if you have any other questions.

0 Kudos
1 Reply
Esri Contributor

Hi Tyler Kirk

Since migrating to WebGL, implicit internal limits for the size of various properties were added - this was done to conserve memory. For rendering markers, we extrude a quad (based on symbol size) and then translate each vertex of that quad based on the x/y offset of the symbol. We then encode this information into a single signed byte per component. That means that the final range of the value (the relative vertex position after translation by the offset) must be +-128 (px) or there may be visual artifacts. This means that the allowable range of values for x/y offsets is unfortunately a factor of the size of the symbol, at least for now.

This is not very clear, and we want to be more explicit about these limitations going forward, clamping and logging warnings when exceeded. Additionally for cases like x/y offset, we would like to potentially modify the rendering logic to instead have hard limitations that are independent of other properties, so that it is easier to know when they are being exceeded.

In general, we don't find many use-cases for offsetting symbols by such a large amount -- typically x/y offset are used to adjust the anchor point of a marker with respect to their image, so we would expect the x/y offset to be less that than size of the marker. Is there a specific use-case you are trying to use the x/y offset to achieve?