This project is read-only.

LineString Problems

Aug 23, 2010 at 6:43 AM

After playing around with linestrings I've come to the conclusion that there are two separate problems:

1. Zooming in causes a line to flip around to a different direction and then disappear. I think this is because when converting from Geo coordinates to pixel coordinates the line becomes too long and Silverlight can't draw it.

There are posts elsewhere regarding problems with lines longer than 2^15 pixels in length in SL. I think the solution is to clip the line where it leaves the map bounding box.

2. Zooming in causes a line to disappear when the entire line should be visible on the map. I think this is a bug in DeepEarth somewhere. However stopping and starting at breakpoints in VS 2010 seems to "kick" things into working.

I created my own class based on Canvas and drew lines that matched ones that had caused problems in DeepEarth with a GeometryLayer. I used the basic SL Line class and added the canvas to the map with MyMap.BaseLayer.Children.Add(MyCanvas). When avoiding GeometryLayer in this way I don't see the problem.

HTH, Andy