AnsweredAssumed Answered

Lines look different on different zoom rate.

Question asked by solarsalestracker on Jan 22, 2019
Latest reply on Jan 23, 2019 by KTientcheu-esristaff

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

Outcomes