none
Displaying a PolyLine extending from the ground to a point in the sky RRS feed

  • Question

  • Up until a few weeks ago the below code would draw a polyline that extended between a point on the ground and the sky. Now it displays horizontally at the altitude of the first point added to the GeoPath (300 meters).  Is this a bug or should I be doing something different to achieve the same effect?

    Running windows build 15063.540 with the UWP app targeting 15063

                BasicGeoposition point1 = new BasicGeoposition()
                {
                    Latitude = 47.25005,
                    Longitude = -121.2180,
                    Altitude = 300
    
                };
    
                BasicGeoposition point2 = new BasicGeoposition()
                {
                    Latitude = 47.25045,
                    Longitude = -121.2180,
                    Altitude = 0
    
                };
    
                Geopath path1 = new Geopath(new List<BasicGeoposition>() { point1, point2 }, AltitudeReferenceSystem.Terrain);
                
    
    
                MapPolyline line = new MapPolyline();
                line.Path = path1;
                line.ZIndex = 100;
    
    
                droneMap.MapElements.Add(line);

    Tuesday, August 22, 2017 3:39 PM

Answers

  • This looks like a bug introduced with the most recent servicing release.

    It should be fixed in the next Windows update.

    • Proposed as answer by Ricky_Brundritt Thursday, August 24, 2017 5:19 PM
    • Marked as answer by DeuceAFW Friday, August 25, 2017 8:07 PM
    Thursday, August 24, 2017 5:13 PM
    Moderator

All replies

  • This looks like a bug introduced with the most recent servicing release.

    It should be fixed in the next Windows update.

    • Proposed as answer by Ricky_Brundritt Thursday, August 24, 2017 5:19 PM
    • Marked as answer by DeuceAFW Friday, August 25, 2017 8:07 PM
    Thursday, August 24, 2017 5:13 PM
    Moderator
  • Awesome, thanks for the reply Ricky
    Friday, August 25, 2017 8:07 PM
  • I can't take all the credit... Duncan was the one who responded :)

    [Blog] [twitter] [LinkedIn]

    Friday, August 25, 2017 10:04 PM
  • This still seems to be a bug for Windows 10 1809 17763.316. I had to use a hack that just offsets the lat/long by just a very small bit .

    // NOTE: Must shift the walls or the map control will fail to draw the line... bug?
    AddOrUpdateLine(i + 2, () => new Geopath(new[]
    	{
    		new BasicGeoposition { Altitude = 0, Latitude = Building.Corners[index].Item1, Longitude = Building.Corners[index].Item2 },
    		new BasicGeoposition { Altitude = Building.Height, Latitude = Building.Corners[index].Item1 + 0.0000001, Longitude = Building.Corners[index].Item2 + 0.0000001 }
    	}, AltitudeReferenceSystem.Terrain)

    Friday, March 8, 2019 3:32 PM
  • This looks different than the originally reported issue - that was causing the lines to ignore the altitude and show at a constant altitude.

    You appear to be running into a premature optimization bug that removes 0 length segments that are added. It's ignoring altitude in the length calculation. Your workaround of adding a small offset is probably the best path for now.

    Tuesday, March 12, 2019 6:26 PM
    Moderator