Lines look different on different zoom rate.

185
1
01-22-2019 10:11 PM
BradJorgensen
New Contributor

Below, I have attached how the lines look on different zoom rate.

These lines are drawn based on this code. (JavaScript Code)

var baseX = Number, baseY = Number

for (var i = 0; i < 100; i ++) {

   var posArray = [

      [ baseX + i, baseY + i ],

      [ baseX + (i + 1), baseY + (i + 1) ]

   ];

   var graphic = new Polyline(map.spatialReference);

   graphic.addPath(posArray);

 

   var symbol = new SimpleFillSymbol(
      SimpleFillSymbol.STYLE_SOLID,
      new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([ 255, 255, 255 ]), 1),
      new Color([ 58, 58, 58, 0.8 ])
   );
   var graphic = new Graphic(geometry, symbol);
   map.graphics.add(graphic);

}

And in normal, the lines drawn should be straight but as you see below, the lines drawn are not straight.

It looks straight on only max-zoom rate and on other zoom rates, it doesn't look straight.

Any solutions?

Minimum Zoom RateMaximum Zoom Rate

0 Kudos
1 Reply
KevinTientcheu3
New Contributor II

Hey Brad,

Are you working in a scene view? If so, there is a known limitation when working in scene views with lines which vertices are close together.