A line I have added to the map is not working correctly - how can I fix it?

0 votes
asked Mar 12, 2016 by ba3user (4,000 points)

I have plotted a Dynamic Line(straight) with Geographic positions (10,-10) and (100,-122), the line seems to be floating around when rotating the Globe . Are there any settings to fix the position of line on the Map?

1 Answer

0 votes
answered Mar 12, 2016 by ba3user (4,000 points)

That is a very long line, and it's a straight line so it goes through the earth. If you want the line drawn on the surface of the earth, you can turn on tessellation for the map using a call like this:

  •  lineMap.setTesselationThreshold(50000); 

This will make the line have points on the earth's surface ever 50,000 meters, or 50km. You can choose a higher number for fewer points. For the best performance, choose the highest number possible that still looks good in your application.