none
DrawingTools. Bad latitude assignement drawing polygons RRS feed

Answers

  • This is a known issue that has been resolved in the experimental branch of Bing Maps V8 and will be rolled into the main release branch around the end of April, beginning of May. You can add &branch=experimental to the map script URL to test this. Alternatively, you can workaround this issue by adding the following check:

    var shape = [the polygon from drawing tools];
    
    if (shape instanceof Microsoft.Maps.Polygon && shape.geometry.rings[0].y.length > 0) {
                    shape.geometry.rings[0].y[shape.geometry.rings[0].y.length - 1] = shape.geometry.rings[0].y[0];
    
    //Polygon is now fixed
    }


    [Blog] [twitter] [LinkedIn]


    Tuesday, April 4, 2017 6:30 PM

All replies

  • This is a known issue that has been resolved in the experimental branch of Bing Maps V8 and will be rolled into the main release branch around the end of April, beginning of May. You can add &branch=experimental to the map script URL to test this. Alternatively, you can workaround this issue by adding the following check:

    var shape = [the polygon from drawing tools];
    
    if (shape instanceof Microsoft.Maps.Polygon && shape.geometry.rings[0].y.length > 0) {
                    shape.geometry.rings[0].y[shape.geometry.rings[0].y.length - 1] = shape.geometry.rings[0].y[0];
    
    //Polygon is now fixed
    }


    [Blog] [twitter] [LinkedIn]


    Tuesday, April 4, 2017 6:30 PM
  • Ok, thank you.
    Wednesday, April 5, 2017 8:34 AM